Skip to main content

praetorian-api-client

My name is Aurelius and I am emperor's counselor 👨‍⚖️. My everyday job is to maintain and manage communication 🗣 between praetorian Cornelius 🛡️ and military commander Maximus ⚔️.

Or just for normal people without abstract thinking I am API Client for praetorian-api project.

Introduction

Praetorian API Client is used for creating requests to Praetorian API and for receiving responses which are deserialized to objects.

Installation

# pip
pip install praetorian-api-client

# pipenv
pipenv install praetorian-api-client

# poetry
poetry add praetorian-api-client

Example

1. Create Environment object

from praetorian_api_client.configuration import Environment

environment = Environment(name='praetorian-api', api_url='http://127.0.0.1:8000/', read_only=False)

2. Create Configuration object

from praetorian_api_client.configuration import Configuration

configuration = Configuration(environment=environment, key='api-key', secret='api-secret')

3. Create ApiClient object

from praetorian_api_client.api_client import ApiClient

api_client = ApiClient.create_from_auth(configuration=configuration, username='username', password='password')

3. Create request from ApiClient to Api

This request will return (if successful) list of Remote objects.

remotes = api_client.remote.list()

Tests

To run tests, you need to run command: pytest

Tests require access data to the api. For security reasons, access data is stored in environment variables. To set environment variables, you need to create an .env file from the example in the .env.example file.


Developed with 💙 and ☕️ by Adam Žúrek & Erik Belák with the support of BACKBONE s.r.o., 2024 (C)

Metadata

Release files for praetorian-api-client 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for praetorian-api-client 0.5.0
File Size Uploaded
praetorian_api_client-0.5.0.tar.gz 6.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for praetorian-api-client 0.5.0
File Interpreter ABI Platform
praetorian_api_client-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 17.6 kB

Release files / praetorian_api_client-0.5.0.tar.gz

Download URL praetorian_api_client-0.5.0.tar.gz
Size 6.9 kB
Tags Source
SHA-256 checksum
How to use checksums
cf1dc04f4bc9790d1e3e1ccd560a41cc6ce8de593afafcfdb059e1e91931ad9b
BLAKE2b-256 checksum
How to use checksums
5e18ca7ad40d7e7ae41a4356143a69453fe6dc47e607ec51938b5db60af4933a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.2 Darwin/23.4.0

Release files / praetorian_api_client-0.5.0-py3-none-any.whl

Download URL praetorian_api_client-0.5.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
065856c88c6680311fb323de985f49c0cff17beecdf5c622e99625eadbb99cbe
BLAKE2b-256 checksum
How to use checksums
e3cd2ee8effe8364d134da3c88f31138cc8a4a8a926b3af5815fb52a26791638
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.2 CPython/3.12.2 Darwin/23.4.0

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.4

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page