Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/MauriceKuenicke/tursopy
Fully type-hinted Turso Platform API wrapper for Python.
https://github.com/MauriceKuenicke/tursopy
api database-management python turso
Last synced: about 1 month ago
JSON representation
Fully type-hinted Turso Platform API wrapper for Python.
- Host: GitHub
- URL: https://github.com/MauriceKuenicke/tursopy
- Owner: MauriceKuenicke
- License: mit
- Created: 2024-03-17T16:21:10.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-04-17T06:01:13.000Z (8 months ago)
- Last Synced: 2024-08-08T16:14:15.782Z (4 months ago)
- Topics: api, database-management, python, turso
- Language: Python
- Homepage: https://mauricekuenicke.github.io/tursopy/
- Size: 581 KB
- Stars: 5
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-turso - TursoPy - hinted API wrapper for the Turso Platform, implemented in Python. (Tools / Community)
README
TursoPy
Fully type-hinted Turso Platform API wrapper for Python.---
**Documentation**: https://mauricekuenicke.github.io/tursopy/
**Source Code**: https://github.com/MauriceKuenicke/tursopy
---
# ⚠️ Important
This project is in early development and currently not safe for use in a production environment. Use at your own risk.## Installation
```sh
pip install tursopy
```## Example Usage
```py
from tursopy import TursoClientclient = TursoClient()
new_api_token = client.create_platform_api_token(name="my-test-token") # Create a new platform token
client.revoke_token(name=new_api_token.name) # Revoke it again# You can also create a new database
new_db = client.db.create_database(org_name="my-org", name="delete-me-later")
print("New database:", new_db)# List available databases in your organization or for your user
print(client.db.list_databases(org_name="my-org"))
client.db.delete_database(org_name="my-org", db_name=new_db.Name) # Delete your database again
```## Initial Platform API Token
TursoPy assumes a platform api token to be available when running the first time. Please refer to the
[official documentation](https://docs.turso.tech/cli/auth/token) to find out how to generate your token.