littleevents
The official, developer-friendly Python SDK for interacting with the Little Africa Events API.
littleevents allows external businesses and organizers to seamlessly list, create, and manage events, as well as configure, disable, or enable ticket tiers on the Little Africa platform.
Key Features
- Resource-Oriented Interface: Natural, idiomatic usage (e.g.
client.events.list_events(),client.ticket_prices.create_ticket_price()). - Resilient Request Pipeline: Automatically handles HTTP retries on standard rate limits (
429) and server errors (5xx) usinghttpx.HTTPTransport. - Zero-Overhead Serialization: Pure Python dictionary interfaces for requests and responses—no complex validation models or Pydantic overhead.
- Rich Error Observation: Surfaces
LittleEventsAPIErrorpreserving raw upstream HTTP status codes, error structures, and validation messages. - Clean Sync Client: Optimized HTTP connection pool management built on
httpx.
Installation
Install the package via pip from PyPI:
pip install littleevents
Quickstart
1. Client Initialization
Import the client and initialize it using your Bearer API token:
from littleevents import LittleEventsClient
# Initialize the client
client = LittleEventsClient(api_key="your-little-bearer-token")
2. Events Management
List Organizer Events
Retrieve all events belonging to the authenticated organizer:
events_response = client.events.list_events()
print(f"Retrieved {len(events_response.get('data', []))} events.")
Create a New Event
Add a new event under your organizer account. Image dimensions must be exactly 500x500 px:
new_event_data = {
"EventName": "Startup Neon Gala",
"Description": "An exquisite evening celebration of tech innovators.",
"Location": "Alchemist Bar, Westlands",
"ContactEmail": "events@example.com",
"ContactPhone": "+254700000000",
"Country": "Kenya",
"City": "Nairobi",
"ImageUrl": "https://example.com/500x500-banner.jpg", # Exactly 500x500 px
"EventType": "regular",
"TestEvent": True, # Set to True for sandbox testing
"Timings": [
{
"ShowID": "cb488791-3252-440c-a1de-e5324f10d8cc",
"Label": "Main Show",
"Start": "2026-06-01T18:00:00.000Z",
"End": "2026-06-01T22:00:00.000Z"
}
]
}
created_event = client.events.create_event(new_event_data)
Get Event Details by ID
event = client.events.get_event("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
print(event["EventName"])
Update Event
Modify details of an existing event (fields are optional):
client.events.update_event(
event_id="a1b2c3d4-e5f6-7890-abcd-ef1234567890",
data={"Location": "Broadwalk Mall, Westlands"}
)
Request Go Live
Submit an event for review and publication by the Little Africa team:
client.events.request_go_live("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
3. Ticket Prices Management
Create Ticket Price
Attach a price tier to an existing event:
ticket_payload = {
"EventID": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"PriceName": "Early Bird General",
"Price": 1500, # In Currency denomination
"Remaining": 100, # Total supply available
"Currency": "KES", # "KES" or "USD"
"MaxAttendees": 100,
"MaxTicketsPerOrder": 5
}
client.ticket_prices.create_ticket_price(ticket_payload)
Update Ticket Price
client.ticket_prices.update_ticket_price(
price_id="f47ac10b-58cc-4372-a567-0e02b2c3d479",
data={"Price": 1800}
)
Disable / Enable Ticket Tiers
Manage the active sales status of ticket tiers:
# Terminate sales for a tier
client.ticket_prices.disable_ticket_price("f47ac10b-58cc-4372-a567-0e02b2c3d479")
# Re-enable sales for a tier
client.ticket_prices.enable_ticket_price("f47ac10b-58cc-4372-a567-0e02b2c3d479")
List Active Ticket Prices
Retrieve active ticket prices bound to a specific event:
active_tickets = client.ticket_prices.list_active_ticket_prices_for_event("a1b2c3d4-e5f6-7890-abcd-ef1234567890")
Robust Error Handling
The SDK raises standard LittleEventsAPIError whenever the Little Africa API responds with a non-2xx status code. This preserves the upstream message and state details:
from littleevents import LittleEventsClient, LittleEventsAPIError
client = LittleEventsClient(api_key="token")
try:
# Trigger an intentional error (e.g. invalid dimensions)
client.events.create_event({
"EventName": "Gala",
"ImageUrl": "https://example.com/invalid-image.jpg" # Not 500x500 px
# ... other missing required fields
})
except LittleEventsAPIError as e:
print(f"API Error Occurred! Status Code: {e.status_code}")
print(f"Server Message: {e.message}")
print(f"Full JSON Payload: {e.response_data}")
License
This project is licensed under the MIT License.
Metadata
Release files for littleevents 0.1.3
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 |
|---|---|---|---|---|
| littleevents-0.1.3.tar.gz | 9.6 kB | Without provenance | Details for littleevents-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| littleevents-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for littleevents-0.1.3-py3-none-any.whl |
Total release size: 19.7 kB
Release files / littleevents-0.1.3.tar.gz
| Download URL | littleevents-0.1.3.tar.gz |
|---|---|
| Size | 9.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ae3c766ddbb88a29362716353aa4bec8e5461937f1a97b5c9d9af2f3a525c26a
|
|
BLAKE2b-256 checksum How to use checksums |
883ad08106adb0ca81158eb0a32d5295e223f79a3efb3e7a9246cd4e532084d0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Release files / littleevents-0.1.3-py3-none-any.whl
| Download URL | littleevents-0.1.3-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c13b73445a01f47464164384a2fc72f4e1a8ef5ceed4ab2d6bfd025d832f228c
|
|
BLAKE2b-256 checksum How to use checksums |
6181fb364fd704af15f969d639d8b40ae6c80b13abf80bc27aef5828e647d402
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.4
|
Security for littleevents 0.1.3
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.