https://github.com/moralcode/pawprints-api
a python API Wrapper for the RIT PawPrints WebSocket API
https://github.com/moralcode/pawprints-api
rochester-institute-of-technology
Last synced: 4 months ago
JSON representation
a python API Wrapper for the RIT PawPrints WebSocket API
- Host: GitHub
- URL: https://github.com/moralcode/pawprints-api
- Owner: MoralCode
- License: gpl-3.0
- Created: 2023-03-06T02:51:16.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-03-25T19:54:43.000Z (almost 3 years ago)
- Last Synced: 2025-02-13T08:19:44.711Z (12 months ago)
- Topics: rochester-institute-of-technology
- Language: Python
- Homepage:
- Size: 61.5 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PawPrints API
A python wrapper for the pawprints WebSockets API
## Usage
```python
from pawprints_api import PawPrints
pawprints = PawPrints()
# connect
await pawprints.connect()
try:
async for data in pawprints.listen():
# Handle the message as needed
print(data)
except Exception:
print('Stopping...')
await api.disconnect()
petition_id = 3456
petition_data = pawprints.get_petition(petition_id)
print(petition_data)
await api.disconnect()
```