Metadata-Version: 2.1
Name: origo-sdk-python
Version: 0.0.10
Summary: SDK for origo
Home-page: https://github.oslo.kommune.no/origo-dataplatform/origo-sdk-python
Author: Oslo Origo
Author-email: dataplattform@oslo.kommune.no
License: UNKNOWN
Description: # Usage
        
        See the origo-cli repo for implementation and usage of the SDK
        
        ## Configuration
        
        When calling any classes interacting with the Origo API and there are no Config params passed to the constructor, a config object will be
        automaticly created for you based on environment variables
        
        
        ### Environment variables
        Default, will pick up configuration from current environment.
        The credentials is resolved automatically if you do not set a specific Auth config, in the following order:
        
        1. _Client Credentials_: If you have added client_id / client_secret to the config. Or if you use the
        environment variable equivalent: `ORIGO_CLIENT_ID` / `ORIGO_CLIENT_SECRET`.
        2. _Username And Password_:  If you have added username / password to the config. Or if you use the
        environment variable equivalent: `ORIGO_USERNAME` / `ORIGO_PASSWORD`.
        ```
        # keycloak user
        export ORIGO_USERNAME=my-user
        
        # keycloak password for ORIGO_USERNAME
        export ORIGO_PASSWORD=my-password
        
        # keycloak client
        export ORIGO_CLIENT_ID=my-machine-client
        
        # keycloak secret for ORIGO_CLIENT_ID
        export ORIGO_CLIENT_SECRET=some-generated-secure-string
        
        
        # overrides default environment (dev), but will be trumped by --env=<environment> on the commandline
        export ORIGO_ENVIRONMENT=dev|prod
        
        # If you are sending events and have been assigned a API key
        export ORIGO_API_KEY=your-api-key
        ```
        
        ### Getting Credentials:
        `username/password ` are synced with Oslo municipalities Active Directory so any user with an association can
        use their personal account to access the SDK.
        
        For `client credentials` please contact the data platform team. `dataplattform[at]oslo.kommune.no`
        
        ### TODO: Named profiles
        If environment variables are not available, the system will try to load from a default profile: Located in ~/.origo/configuration
        
        ## Run
        ```
        git clone git@github.oslo.kommune.no:origo-dataplatform/origo-sdk-python.git
        cd origo-sdk-python
        python3.7 -m venv .venv
        . .venv/bin/activate
        make init
        ```
        
        # Development
        ## Releasing a new sdk version
        * Checkout the master branch
        * Either run `make` 
        
        or manually run the make targets:
        1. Test
        ```
        make clean test
        ```
        2. Bump version and Build
        ```
        make bump-patch build 
        ```
        3. Publish the module to pypi
        ```
        make publish-module
        ```
        * Finally push the version bump changes to git. Either make a new PR or push to master
        
        ## Getting started
        
        Run all tests:
        ```
        $ make test
        ```
        
        Reformat files:
        ```
        make format
        ```
        
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
