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 hashes)

Uploaded Source

Built Distribution

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