Skip to main content

Add your description here

Project description

polis-client-py

An unofficial Python API client for communicating with any Polis servers.

It will start off as read-only, but I intend to add helpers for handling POST requests via xid, and maybe jwt.

This will eventually be used in the red-dwarf algorithm library, doing much of the work of that library's current "data loader".

Installation

pip install git+https://github.com/patcon/polis-client

Usage

See: examples.ipynb

File Structure

./polis-client/
├── Makefile                    # Shared: Build scripts
├── README.md                   # Shared: Main project README
├── openapi
│   └── polis.yml               # Shared: OpenAPI spec
├── pyproject.toml              # Python dependencies
└── python
    ├── README.md               # Python client README
    ├── debug.py                # Messy testing file
    ├── examples.ipynb          # Primary documentation
    └── src
        └── polis_client
            ├── client.py       # Custom Python thin client
            └── generated/      # Auto-generated client code

Development

(We use uv, but you can use any Python environment.)

This project is structured around an OpenAPI definition at ../openapi/polis.yml, from which most of the code in this repository is auto-generated.

We have written a thin custom client around the auto-generated client code that is built (from the repository root) with:

$ uv run make regenerate-py

This command must be run whenever you update the YAML spec file. For legibility of commit history, any updates to auto-generated should be committed in a batch separate from your own changes. (e.g. "Adding auto-generated code.")

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

polis_client-0.1.0.tar.gz (215.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

polis_client-0.1.0-py3-none-any.whl (64.1 kB view details)

Uploaded Python 3

File details

Details for the file polis_client-0.1.0.tar.gz.

File metadata

  • Download URL: polis_client-0.1.0.tar.gz
  • Upload date:
  • Size: 215.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.2

File hashes

Hashes for polis_client-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2051d626c9c061d093c49e28b28731cf1f83ae4787417d27009a0e26c15fafd9
MD5 052ac60d8859974ac5dbd5eead17e7c7
BLAKE2b-256 8fc48e7e499696a3dbe8f4ba2f3e979a2e3c19adda059f8fcc93bd7796783cbf

See more details on using hashes here.

File details

Details for the file polis_client-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for polis_client-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6386c8e5161c36b1405dbc76a8f1b9ccb284a3cf9d4f2c4667db0a91b159a30
MD5 7862bc47a02ecaada39e54b40710c1eb
BLAKE2b-256 1b63956bf4fc9f04578a3b21fdfda054bfd04721079e3421166b1d5c5ce13fd7

See more details on using hashes here.

Supported by

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