Metadata-Version: 2.4
Name: d1-client
Version: 0.1.0
Summary: A Python sync/async client for the Cloudflare D1 database API
Home-page: https://github.com/Haozhe-Li/D1-Client
Author: Haozhe Li
Author-email: Haozhe Li <mail@haozheli.com>
Project-URL: Homepage, https://github.com/Haozhe-Li/D1-Client
Project-URL: Source, https://github.com/Haozhe-Li/D1-Client
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: httpx
Requires-Dist: pydantic
Dynamic: author
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-python

# d1-client

`d1-client` is a naive synchronous and asynchronous Python client for the Cloudflare D1 database API.

## Installation

```bash
pip install d1-client
```

## Usage

Synchronous client:

```python
from d1_client import D1Client

client = D1Client(account_id="your_account_id", api_token="your_api_token")
resp = client.list_db()
print(resp.success, resp.result)
client.close()
```

Asynchronous client:

```python
import asyncio
from d1_client import AsyncD1Client


async def main() -> None:
	client = AsyncD1Client(account_id="your_account_id", api_token="your_api_token")
	resp = await client.list_db()
	print(resp.success, resp.result)
	await client.aclose()


asyncio.run(main())
```
