Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • P Python SDK
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 5
    • Merge requests 5
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe SoftwareOpen Subsurface Data Universe Software
  • Platform
  • System
  • SDKs
  • Python SDK
  • Issues
  • #3
Closed
Open
Issue created Jun 25, 2021 by Siarhei Khaletski (EPAM)@Siarhei_Khaletski🚩Owner

Python dotenv usage

Context

The SDK is configured through the open_api.ini file. The file is parsing within base_client.py during instantiation of BaseClient descendants' instances.

There are use cases when it will be nice to have a possibility to configure the SDK by environment variables, for instance, when we use the SDK in CI/CD pipelines or provisioning scripts without usage of open_api.ini file.

Decision

  • Use python-dotenv for config management

Scope

  • Replace open_api.ini file by .env file (https://community.opengroup.org/osdu/platform/system/sdks/common-python-sdk/-/blob/master/osdu_api/base_client.py#L30);
  • Change __init_ method of BaseClient class (https://community.opengroup.org/osdu/platform/system/sdks/common-python-sdk/-/blob/master/osdu_api/base_client.py#L49);
  • Replace open_api.ini file for existing parsers (e.g. WITSML parser)

Optional:

  • Add dynamic access to the parameters, i.e. remove explicit initialization of a instance properties and add dynamic access to any of them;
Edited Jun 25, 2021 by Siarhei Khaletski (EPAM)
Assignee
Assign to
Time tracking