Skip to main content

An asyncio wrapper for Cloudflare D1 REST API.

Project description

AIO CF D1

A simple asyncio wrapper for Cloudflare D1's REST API. It does nothing but query SQL.

Install

pip install aiocfd1

Usage

from aiocfd1 import D1
import asyncio
# Get these credentials from cloudflare dashboard!
db = D1("account id", "token", "database id")
async def test():
    result = await db.execute("SELECT * FROM table; SELECT * FROM table WHERE something = 'test';")
    print(result)

asyncio.run(test())

Output

[
    [
        {
            "something": "lorem",
            "foo": "bar"
        },
        {
            "something": "test",
            "foo": "baz"
        },
        {
            "something": "abc",
            "foo": "qux"
        }
    ],
    [
        {
            "something": "test",
            "foo": "baz"
        }
    ]
]

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiocfd1-1.0.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aiocfd1-1.0.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

Details for the file aiocfd1-1.0.0.tar.gz.

File metadata

  • Download URL: aiocfd1-1.0.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for aiocfd1-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9c43c3c467bbf71c4df1a805e6c43b9b66156db9361174ccce475f9d3edd9f5d
MD5 a5fd52fa92490d424bad796d42f96d42
BLAKE2b-256 c3be752777ece9d988d97ba7fbcdba1f8a1bfc79d9614c7cb17b3dea2d60f303

See more details on using hashes here.

File details

Details for the file aiocfd1-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: aiocfd1-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 3.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.24

File hashes

Hashes for aiocfd1-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4d5ae42509963646ea89d43d5cbaee834bbfe71de82008c6d4cd7015e3d83ffc
MD5 74015540ba5fd29aaef0a86fe56b4ed9
BLAKE2b-256 ce61a4054adc43b167a43c3a2231c23ac0a7fc0a1628ce34ef135f00c33215d2

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page