Python client to interface with Seatsurfing
Project description
python-seatsurfing
A Python client and library to interact with the Seatsurfing API.
[!IMPORTANT] The library is a work in progress, not all functionality is available yet, or finalized.
Installation
pip install python-seatsurfing
Usage
Usage with known organization ID and credentials:
from datetime import datetime
import seatsurfing
# Create client with authentication information
client = seatsurfing.Client(
base_url="https://seatsurfing.example.com",
organization_id = "9a2184f9-671f-440b-81f0-18e217af34f8",
username="admin@seatsurfing.local",
password="12345678",
)
# Get bookings for the next 30 days
from_date = datetime.today()
to_date = datetime.today() + timedelta(days=30)
bookings = client.booking.get_filtered_org_bookings(from_date, to_date)
print(bookings)
Usage with fetching data dynamically:
from datetime import datetime
import seatsurfing
# Create unauthenticated client
client = seatsurfing.Client(base_url="https://seatsurfing.example.com")
# Fetch organization information
org = client.authentication.get_singleorg()
# Authenticate to the organization
client.login(organization_id=org.organization.id, username="admin@seatsurfing.local", password="1234678")
# Get bookings for the next 30 days
from_date = datetime.today()
to_date = datetime.today() + timedelta(days=30)
bookings = client.booking.get_filtered_org_bookings(from_date, to_date)
print(bookings)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_seatsurfing-0.4.1-py3-none-any.whl.
File metadata
- Download URL: python_seatsurfing-0.4.1-py3-none-any.whl
- Upload date:
- Size: 8.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b6133a055cbb8509fae9941227310560efd2eb35d150e0d5f2a56be74f9e7a5
|
|
| MD5 |
f3e9337586f5e755da2168bd0d4016e3
|
|
| BLAKE2b-256 |
403b28595e75af714bfac6f7683c138700890865eeb9bca3f0f252663c28b3a9
|