SDK for the Assets API
SDK for inquire-assets API.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
Pip-install package from packagr.
pip install inquire_assets_sdk --extra-index-url https://api.packagr.app/EYvhW6Syl/
Code examples are found in the /examples folder These can either be opened in google Colab or downloaded and used with anacondas jupyter notebooks
At the desired location, run:
git clone https://github.com/SevanSSP/inquire-assets-sdk-python.git
Create an isolated Python environment and activate it,
```console python -m venv /path/to/new/virtual/environment
/path/to/new/virtual/environment/Scripts/activate ```
... and install the dev dependencies in poetry.lock,
console
poetry install
The application is published as a package to Sevans packagr site. To use this library in other projects use:
pip install inquire_assets_sdk --extra-index-url https://api.packagr.app/EYvhW6Syl/ -U
Continue by logging in to the packagr server with your credentials.
To run all tests:
pytest tests
This requires the environmental variables INQUIRE_ASSETS_API_HOST, INQUIRE_ASSETS_API_USER, INQUIRE_ASSETS_API_PASSWORD Where the API-host is a local instance of the inquire-assets-api application, and the username/password are stored in the relevant database.
|-- .github | |-- workflows | |-- publish-package.yml # Github actions file to publish package of application to packagr | |-- pytest.yml # Github actions file to run pytest on pull and push to dev / master | |-- inquire_assets_sdk | |-- config.py # Configure connection to API | |-- client.py # Client handeling all HTTP-requests to API | |-- exceptions.py # Handles error messages from failed HTTP-requests | |-- api_resources.py # Abstraction layer betweem client and user-side | |-- resources.py # Client-side classes and functions for campaign, timeseries ... etc | |-- utils.py # Utility functions used in several parts of the SDK | |-- .gitignore |-- Requirements.txt # File containing all python packages used |-- LICENSE |-- setup.py # Setup file configuring the python package uploaded to Packagr
This project uses semantic versioning. More info
Given a version number MAJOR.MINOR.PATCH, increment the:
Important: Keep the API and SDK to the same major versioning
This project is licensed under the MIT License - see the LICENSE file for details.