Skip to main content

Python client for the Gancio event platform API

Project description

gancio-py

Tests PyPI Python

Python client for the Gancio event platform API.

Installation

pip install gancio-py

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.0b1.tar.gz (55.3 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.0b1-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gancio_py-0.1.0b1.tar.gz
Algorithm Hash digest
SHA256 21fe553e010b870d0b0b5dba171b265b848795af34fb80cc75fbb9a4f7b6f6ca
MD5 3bbf0d6937c6e81117ef56ab4d2f175e
BLAKE2b-256 554349861b54e8acf6f53fac168a786e1fda6866a474a8381115374aa96814bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for gancio_py-0.1.0b1.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.0b1-py3-none-any.whl.

File metadata

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

File hashes

Hashes for gancio_py-0.1.0b1-py3-none-any.whl
Algorithm Hash digest
SHA256 852c4840e75b583344d028f180305ba2319f3233db47121b7ead7c21adac2427
MD5 dd67ce47dc4e809e08ea4c2407a16938
BLAKE2b-256 30c8aeebd019aa0e6a5264695af9fa47deb6fde47129e0b5363f05da551c8873

See more details on using hashes here.

Provenance

The following attestation bundles were made for gancio_py-0.1.0b1-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