Python interface for the PHC.
Project description
PHC SDK for Python
The phc-sdk-py is a developer kit for interfacing with the PHC API on Python 3.7 and above.
Project Status
Getting Started
Dependencies
- Python 3 version >= 3.7
Getting the Source
This project is hosted on GitHub. You can clone this project directly using this command:
git clone git@github.com:lifeomic/phc-sdk-py.git
Development
Python environments are managed using virtualenv. Be sure to have this installed first pip install virtualenv
. The makefile will setup the environment for the targets listed below.
Setup
This installs some pre-commit hooks that will format and lint new changes.
make setup
Running tests
make test
Linting
make lint
Installation
pip install phc
Usage
A Session
needs to be created first that stores the token and account information needed to access the PHC API. One can currently using API Key tokens generated from the PHC Account, or OAuth tokens generated using the CLI.
from phc import Session
session = Session(token=<TOKEN VALUE>, account="myaccount")
Once a Session
is created, you can then access the different parts of the platform.
from phc.services import Accounts
accounts = Accounts(session)
myaccounts = accounts.get_list()
Release Process
Releases are generally created with each merged PR. Packages for each release are published to PyPi. See CHANGELOG.md for release notes.
Versioning
This project uses Semantic Versioning.
Contributing
We encourage public contributions! Please review CONTRIBUTING.md and CODE_OF_CONDUCT.md for details on our code of conduct and development process.
License
This project is licensed under the MIT License - see LICENSE file for details.
Authors
See the list of contributors who participate in this project.
Acknowledgements
This project is built with the following:
- aiohttp - Asynchronous HTTP Client/Server for asyncio and Python.
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
File details
Details for the file phc-0.24.0.tar.gz
.
File metadata
- Download URL: phc-0.24.0.tar.gz
- Upload date:
- Size: 68.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1c8b23167c7cc2928c53d20b85bc37bd01bdbf16aa9fc4f11f759b7b3faa1a2f |
|
MD5 | e0b56e1f4b1ebc15fc9cd66e9289191c |
|
BLAKE2b-256 | 1ea2706f3172b25bcd9673abc20d87f6d23cfeaa37b7df4c4784345d75ad25be |
File details
Details for the file phc-0.24.0-py3-none-any.whl
.
File metadata
- Download URL: phc-0.24.0-py3-none-any.whl
- Upload date:
- Size: 115.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba81412efaf06ccb021f322e0eb4e7dcf8919668cf3186d3f8220f08c797944b |
|
MD5 | 0a3253bc13a7b310f9f4a56446df597b |
|
BLAKE2b-256 | 383b1cec6ab512ffab12c0c5e12b62c1314e55dc948c470d1f4d8be52f23bf22 |