# seatsio-python, the official Seats.io Python client library
[](https://travis-ci.org/seatsio/seatsio-python)
This is the official Python client library for the [Seats.io V2 REST API](https://docs.seats.io/docs/api-overview), supporting python 2.7, and python 3.3 - 3.6.
## Installing
` pip install seatsio `
## Versioning
seatsio-python only uses major version numbers: v5, v6, v7 etc. Each release - backwards compatible or not - receives a new major version number.
The reason: we want to play safe and assume that each release _might_ break backwards compatibility.
## Examples
### Creating a chart and an event
`python import seatsio client = seatsio.Client(secret_key="my-secret-key") # can be found on https://app.seats.io/settings chart = client.charts.create() event = client.events.create(chart.key) `
### Booking objects
`python import seatsio client = seatsio.Client(secret_key="my-secret-key") client.events.book(event.key, ["A-1", "A-2"]) `
### Releasing objects
`python import seatsio client = seatsio.Client(secret_key="my-secret-key") client.events.release(event.key, ["A-1", "A-2"]) `
### Booking objects that have been held
`python import seatsio client = seatsio.Client(secret_key="my-secret-key") client.events.book(event.key, ["A-1", "A-2"], hold_token="a-hold-token") `
### Changing object status
`python import seatsio client = seatsio.Client(secret_key="my-secret-key") client.events.change_object_status("<EVENT KEY>", ["A-1", "A-2"], "my-custom-status") `
### Listing all charts
`python import seatsio client = seatsio.Client(secret_key="my-secret-key") charts = client.charts.list() # returns a PagedIterator object `
### Listing the first page of charts (default page size is 20)
`python import seatsio client = seatsio.Client(secret_key="my-secret-key") charts = client.charts.list_first_page() # returns a Page object `
## Error handling
When an API call results in a 4xx or 5xx error (e.g. when a chart could not be found), a SeatsioException is raised.
This exception contains a message string describing what went wrong, and also two other properties:
Errors: a list of errors (containing a code and a message) that the server returned. In most cases, this list will contain only one element.
RequestId: the identifier of the request you made. Please mention this to us when you have questions, as it will make debugging easier.
Metadata
Release files for seatsio 32
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| seatsio-32.tar.gz | 10.8 kB | Without provenance | Details for seatsio-32.tar.gz |
Release files / seatsio-32.tar.gz
| Download URL | seatsio-32.tar.gz |
|---|---|
| Size | 10.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a499c6ecd427bce7a2a6647293b12f1dc0c9ad3db40efafba501fe2de2377e65
|
|
BLAKE2b-256 checksum How to use checksums |
02726eb5ab544c83ad53cc0c20ee190f8b3318144bc6c2e672fb857fdb0a1e7f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.3
|
Security for seatsio 32
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.