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.0b2.tar.gz (58.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.0b2-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gancio_py-0.1.0b2.tar.gz
  • Upload date:
  • Size: 58.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.0b2.tar.gz
Algorithm Hash digest
SHA256 2bdc528419cd765fc7da29f6941d739161c00ed51f4d6095170ba99e8e767517
MD5 ebef4e647cf7455d2a31a1efb87090a2
BLAKE2b-256 c65b466962f38b7e688c79bd4fc6ad1ecb1c253a106dac57a89ca210c9af83f8

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: gancio_py-0.1.0b2-py3-none-any.whl
  • Upload date:
  • Size: 9.1 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.0b2-py3-none-any.whl
Algorithm Hash digest
SHA256 9cfee82b779fe7a07deab3976cfbc9ecc6a0444bd8e2325d514284eac2f427c7
MD5 3db34d3737410a972422e61a956a7ffd
BLAKE2b-256 567e628f8fb00f3d5b789d922de6329258919159458e2bf4b494d86077595bf5

See more details on using hashes here.

Provenance

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