Skip to main content

High-level Python client for managing users, indexes, tokens, and packages on devpi servers.

Project description

Devpi API Client

Python client for automating user, index, token, and package management on a devpi server.

Installation

pip install devpi-api-client

To hack on the project locally:

pip install pipx
pipx install poetry
poetry install --with dev,docs

Quickstart

from devpi_api_client import Client

with Client("https://devpi.example.com", user="root", password="s3cret") as client:
    client.user.create("service", "changeme", email="svc@example.com")
    indexes = client.index.list("service")
    token = client.token.create("service", allowed=["upload"], expires_in_seconds=3600)

Logging

Enable debug logging to observe outgoing requests and error handling:

import logging

logging.basicConfig(level=logging.INFO)
logging.getLogger("devpi_api_client").setLevel(logging.DEBUG)

Documentation

Refer to docs/index.md for contributor and operator guides. Build the HTML docs locally:

poetry run mkdocs serve

Testing

poetry run pytest
poetry run ruff check .
poetry run mypy devpi_api_client

Release Process

  1. Update CHANGELOG.md and bump the version with poetry version <patch|minor|major>.
  2. Commit changes and push a tag like v0.2.0.
  3. GitHub Actions builds and publishes to PyPI using the workflow described in docs/RELEASE_GUIDE.md.

License

MIT License. See LICENSE for full text.

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

devpi_api_client-0.2.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

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

devpi_api_client-0.2.0-py3-none-any.whl (24.0 kB view details)

Uploaded Python 3

File details

Details for the file devpi_api_client-0.2.0.tar.gz.

File metadata

  • Download URL: devpi_api_client-0.2.0.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for devpi_api_client-0.2.0.tar.gz
Algorithm Hash digest
SHA256 432e7cd65b6c2868fcb2b956ee1b831356ec6f7ac2b853136a5d719c031c0f8a
MD5 89c7160890334c3d4a8da4ddca6a65a8
BLAKE2b-256 37b62f4c59e38aedff04bff3f18a6f71c84f8dc471d59dc62242dc51d0ff016c

See more details on using hashes here.

File details

Details for the file devpi_api_client-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: devpi_api_client-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 24.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.11.13 Linux/6.11.0-1018-azure

File hashes

Hashes for devpi_api_client-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef394e8ef0a257dfb9d86760d30c81159ba4d1400028e986c97dd1362b2d2960
MD5 f8277481709f4b03de241ada617c3ece
BLAKE2b-256 054a22c8dd7499c7dd3431d1acb9e8ea08deafbec1ccae2a085a2c433245272c

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