Skip to main content

Python client for the Gancio event platform API

Project description

gancio-py

Tests PyPI Python Coverage Status

Python client for the Gancio event platform API.

Installation

pip install --pre gancio-py

Note: gancio-py is currently in beta. The API may change before the stable release.

Usage

from gancio_py import Gancio

# Connect and log in
gancio = Gancio("https://your-gancio-instance.org")
gancio.login("user@example.com", "password")

# Or use a pre-existing token
gancio = Gancio("https://your-gancio-instance.org", access_token="your-token")

# Create an event
event = gancio.create_event(title="My Event",
                            start_datetime=1700000000,
                            place_name="The Venue",
                            place_address="123 Main St",
                            tags=["music", "live"])

# List events
events = gancio.get_events(tags=["music"])

# Get a specific event
event = gancio.get_event("my-event")

# Update an event
gancio.update_event(event_id=1, title="Updated Title")

# Delete an event
gancio.delete_event(event_id=1)

# Search places
places = gancio.search_place("Venue")

Error handling

from gancio_py import Gancio, GancioError

gancio = Gancio("https://your-gancio-instance.org")

try:
    event = gancio.get_event("nonexistent-slug")
except GancioError as e:
    print(e.status_code)     # 404
    print(e.response_body)   # error details from the server

Development

Run integration tests locally with Docker:

uv sync --extra test

# Fresh container (runs first-time setup automatically):
docker compose down -v && docker compose up -d
uv run pytest -m integration -v --cov

# Or against an existing instance with known credentials:
GANCIO_URL=http://localhost:13120 \
GANCIO_ADMIN_EMAIL=admin \
GANCIO_ADMIN_PASSWORD=yourpassword \
uv run pytest -m integration -v --cov

Linting

uvx ruff check
uvx ruff check --fix  # auto-fix

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

gancio_py-0.1.0b3.tar.gz (61.7 kB view details)

Uploaded Source

Built Distribution

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

gancio_py-0.1.0b3-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file gancio_py-0.1.0b3.tar.gz.

File metadata

  • Download URL: gancio_py-0.1.0b3.tar.gz
  • Upload date:
  • Size: 61.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gancio_py-0.1.0b3.tar.gz
Algorithm Hash digest
SHA256 20a1a6c8377bba542d65fee32eb9909f12ff6a6dae65b2e81307fd4329e8caf7
MD5 2d8da8ed30c08eef834d5a27be18ba38
BLAKE2b-256 fe021862deff4c4c0c0f7fea9d8e82802c59258226bccb5f08b6a50d17326b0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for gancio_py-0.1.0b3.tar.gz:

Publisher: publish.yml on tboye/gancio-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gancio_py-0.1.0b3-py3-none-any.whl.

File metadata

  • Download URL: gancio_py-0.1.0b3-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for gancio_py-0.1.0b3-py3-none-any.whl
Algorithm Hash digest
SHA256 74e154cfc10a923969133814a0437e86219b817f06a594e8b9e332ab118642ba
MD5 430ae7b562343c83b355191bbfd56d4d
BLAKE2b-256 1e07ad0dd82b03224b430abdb8d8d563f0b9e9640586aae514e1601f5edd019c

See more details on using hashes here.

Provenance

The following attestation bundles were made for gancio_py-0.1.0b3-py3-none-any.whl:

Publisher: publish.yml on tboye/gancio-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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