Skip to main content

Package for connection to Picsellia platforms with some wrapper around requests library

Project description

Picsellia Services

Picsellia Services is a Python library that wraps connexions with Picsellia micro services.

Installation

Use the package manager pip to install picsellia-connexion-services.

pip install picsellia-connexion-services

Usage

JwtToken

from picsellia_connexion_services.jwt_service import JwtServiceConnexion
service = JwtServiceConnexion({'api_token': '<api_token>', 'deployment_id': '<deployment_id>'}, 'localhost:8000')
service.get(f'/deployment/{deployment_id}/stats')

Usage in mocked tests

from picsellia_connexion_services.mocked_service import MockedServiceConnexion
service = MockedServiceConnexion('test')
service.set_next_mocked_response("get", "/ping", JsonResponse({"ok" : True}, status=status.HTTP_200_OK))
service.get("/ping")

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

picsellia_connexion_services-0.2.1.tar.gz (6.2 kB view details)

Uploaded Source

Built Distribution

File details

Details for the file picsellia_connexion_services-0.2.1.tar.gz.

File metadata

File hashes

Hashes for picsellia_connexion_services-0.2.1.tar.gz
Algorithm Hash digest
SHA256 c0e8803a86187099288bfef065d79f8de137abbe5b8e1b9f8843a00f8cf82802
MD5 7b3344151716b692b1b148c5542af1f6
BLAKE2b-256 531d0de3853d44074dc7ea4a67906e476987a342c35e46e77e3b31792fe10bf1

See more details on using hashes here.

File details

Details for the file picsellia_connexion_services-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for picsellia_connexion_services-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0f9603525762594d7a1ab5182d122f68a3f7304a7941e820c0844768082ceee0
MD5 3eb007f7bcb3a1aec70f6ac988a384cb
BLAKE2b-256 6e064010a86f3e0d3572e64dc51763e7cdd39a44a47c34fccbae0864460aac52

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page