Apollo3 python client
Project description
apollo3-client
Python library for accessing the Apollo3 API.
Installation
The package can be installed with pip
:
pip install apollo3-client
The package can be installed with poetry
:
poetry add apollo3-client
Requirements
- Python 3.8+
Quick Start
To use this library, you must have apollo3 api uri. We can specify it as a string when creating the apollo3.Client
object. This is a basic example of the creating the client.
Note: username and password is required by apollo for root authentication (Implementation in progress). If we don't pass username and password then the client will use guest login to get the jwt token
from apollo3 import Apollo3Client
client = Apollo3Client(api_url="http://localhost:3999")
assemblies = client.assemblies_obj()
for assembly in assemblies:
changes = client.changes_obj(assembly_id=assembly.id)
for change in changes:
feature = client.feature(feature_id=change.feature_id)
print(feature)
Endpoints
Apollo3 Endpoint | Function |
---|---|
/assemblies | client.assemblies() or client.assemblies_obj() |
/changes | client.changes() or client.changes_obj() |
/features | client.feature() |
Contributing
To set up a development environment, first ensure you have poetry 1.5+ installed and run:
poetry install # install and update dependencies in your environment, the first time
Configure the APOLLO3_API_URL in client.py
You can run tests locally using:
poetry run pytest
Project details
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
File details
Details for the file apollo3_client-0.4.2.tar.gz
.
File metadata
- Download URL: apollo3_client-0.4.2.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d062c25fb9d2936eb5cefa6fc415477eea04fb4bf1522623ebfc88aa0fb50a5 |
|
MD5 | 30babe24bee42c9fc77bedb7839dc1e8 |
|
BLAKE2b-256 | 1d9743ca4b7851945890be19c5f336f57b59dfd01cdc2d900276db4112c13aa4 |
File details
Details for the file apollo3_client-0.4.2-py3-none-any.whl
.
File metadata
- Download URL: apollo3_client-0.4.2-py3-none-any.whl
- Upload date:
- Size: 9.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.18
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7c1f59346b148aa67036f0f53a895376b328b2001ef96660946e6ffc35231ea0 |
|
MD5 | dc70fc6dd724b212703ff897002dac9c |
|
BLAKE2b-256 | 9782857d818ee0d17ca113a32de8786ea3b24849ede045c06a0c6ea350919723 |