Python package to deliver a Gantner cloud interface
Project description
gimodules-python
Usage
Install from PyPi
pip install gimodules
Import module in python script and call functions.
A detailed description of the package and other APIs can be found in the Gantner Documentation.
from gimodules.cloudconnect.cloud_request import CloudRequest
cloud = CloudRequest()
cloud.login(url='https://example.gi-cloud.io', access_token='TOKEN') # Create a token under Tools -> Monitor
cloud.get_all_stream_metadata()
Development
Information on how to manually distribute this package can be found here
https://packaging.python.org/en/latest/tutorials/packaging-projects/
Distribute with CI / CD
Edit setup.py version number and create a release. -> Creating a release will trigger the workflow to push the package to PyPi
Tests
run tests locally:
pipenv run test -v
or
pytest`
Requirements
When starting to develop you can install the requirements with:
pip install -r requirements.txt
When you add new components and the requirements change, you can find out what packages are needed by the project and create new requirements:
pipreqs .
To create project all current packages installed in your venv for requirements automatically:
pip3 freeze > requirements.txt
NOTE: Remove the old gimodules version from requirements.txt before pushing (dependency conflict).
Documentation
The documentation is being built as extern script in the GI.Sphinx repository.
The documentation consists of partially generated content. To generate .rst files from the code package, run the following command from the root directory of the project:
sphinx-apidoc -o docs/source/ gimodules
To build the documentation, run the following command:
cd docs
make html
Linting / Type hints
This project follows the codestyle PEP8 and uses the linter flake8 (with line length = 100).
You can format and check the code using lint.sh:
./lint.sh [directory/]
Type hints are highly recommended. Type hints in Python specify the expected data types of variables, function arguments, and return values, improving code readability, catching errors early, and aiding in IDE autocompletion.
To include type hints in the check:
mpypy=true ./lint.sh [directory])
TODO
- lint.sh diff between black and flake8 etc
- Usage with python 3.12
- Doc requirements
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file gimodules-0.1.1.tar.gz.
File metadata
- Download URL: gimodules-0.1.1.tar.gz
- Upload date:
- Size: 35.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04190b58b472c83b9e2104b779601112ab5e6358e95a58b59503938e6a4e0d61
|
|
| MD5 |
ea325dcc723bb0ef13c1e3677ed6dd28
|
|
| BLAKE2b-256 |
8a995a4d44b1a177450895455c24eff5d0aae05b23b8a8c3375470b85cfade7f
|
File details
Details for the file gimodules-0.1.1-py3-none-any.whl.
File metadata
- Download URL: gimodules-0.1.1-py3-none-any.whl
- Upload date:
- Size: 37.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.9.21
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03e2509c2f3d0c21bd8acb0526050258942868b1791b6be13ff5e6418627e94e
|
|
| MD5 |
1fb12f98524e0a2f9d2022d445b870a2
|
|
| BLAKE2b-256 |
157f20380ac9d3410ed9d97ad5c786f35bfb58860af8bb70528474ef8e752f0f
|