aiodeta
Unofficial client for Deta Clound
Supported functionality
- Deta Base
- Deta Drive
- Decorator for cron tasks
Examples
import asyncio
from aiodeta import Deta
DETA_PROJECT_KEY = "xxx_yyy"
async def go():
db_name = "users"
# Initialize Deta client
deta = Deta(DETA_PROJECT_KEY)
# Initialize Deta Base client
base = deta.Base(db_name)
# Create row in Deta Base
user = {"username": "steve", "active": False}
resp = await base.insert(user)
print(resp)
user_key = resp["key"]
# Update row by key
resp = await base.update(user_key, set={"active": True})
print(resp)
# Get row by key
resp = await base.get(user_key)
print(resp)
# Delete row by key
resp = await base.delete(user_key)
print(resp)
# Create multiple rows in one request
users = [
{"username": "jeff", "active": True},
{"username": "rob", "active": False},
{"username": "joe", "active": True}
]
resp = await base.put(users)
print(resp)
# Query data
query = [{"active": True}, {"username?pfx": "j"}]
result = await base.query(query=query, limit=10)
print(result)
# Close connection
await deta.close()
loop = asyncio.get_event_loop()
loop.run_until_complete(go())
Metadata
Release files for aiodeta 0.1.2
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 |
|---|---|---|---|---|
| aiodeta-0.1.2.tar.gz | 3.7 kB | Without provenance | Details for aiodeta-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| aiodeta-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for aiodeta-0.1.2-py3-none-any.whl |
Total release size: 7.3 kB
Release files / aiodeta-0.1.2.tar.gz
| Download URL | aiodeta-0.1.2.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ad1a2d747349df8ddfffab99a5cfbf09eac64cd29ec50b8ed694e9bb398ff287
|
|
BLAKE2b-256 checksum How to use checksums |
35dd590c96f482153262a6becb734e5667332971a4ed7f01a54a5d2bac768639
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.7.7 Darwin/20.6.0
|
Release files / aiodeta-0.1.2-py3-none-any.whl
| Download URL | aiodeta-0.1.2-py3-none-any.whl |
|---|---|
| Size | 3.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fba299fd5c754c797a065c241254108fe7353399cd17251c1803f067812fb9b
|
|
BLAKE2b-256 checksum How to use checksums |
e492b5c2318ea257adb249d3e1c93107a7337ac3621b7df1ebbdd30c8825dd0a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.7 CPython/3.7.7 Darwin/20.6.0
|
Security for aiodeta 0.1.2
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.