semvec/pypi-packages huggingface dataset:
dolphindb-tools 0.2a1
A tool package based on DolphinDB Python API.

# dolphindb-tools

DolphinDB Python Tool Collection

## How to Install
```
pip install dolphindb-tools
```
For installing dolphindb-tools with support for PyTorch, use the following command:
```
pip install dolphindb-tools[pytorch]
```
For installing dolphindb-tools with support for tensorflow, use the following command:
```
pip install dolphindb-tools[tensorflow]
```
## Example

```
import dolphindb as ddb
from dolphindb_tools.dataloader import DDBDataLoader

sess = ddb.session()
sess.connect("localhost", 8848, "admin", "123456")

sess.run("""
    t = table(1..10 as a, 2..11 as b, 3..12 as c)
""")

sql = 'select * from objByName("t")'
         
dataloader = DDBDataLoader(sess, sql, ["c"])

for X, y in dataloader:
    print(X, y)

--------------------------------------------------
tensor([[1, 2, 3]], dtype=torch.int32) tensor([[3]], dtype=torch.int32)
tensor([[2, 3, 4]], dtype=torch.int32) tensor([[4]], dtype=torch.int32)
tensor([[3, 4, 5]], dtype=torch.int32) tensor([[5]], dtype=torch.int32)
tensor([[4, 5, 6]], dtype=torch.int32) tensor([[6]], dtype=torch.int32)
tensor([[5, 6, 7]], dtype=torch.int32) tensor([[7]], dtype=torch.int32)
tensor([[6, 7, 8]], dtype=torch.int32) tensor([[8]], dtype=torch.int32)
tensor([[7, 8, 9]], dtype=torch.int32) tensor([[9]], dtype=torch.int32)
tensor([[ 8,  9, 10]], dtype=torch.int32) tensor([[10]], dtype=torch.int32)
tensor([[ 9, 10, 11]], dtype=torch.int32) tensor([[11]], dtype=torch.int32)
tensor([[10, 11, 12]], dtype=torch.int32) tensor([[12]], dtype=torch.int32)
```
tursopy 0.0.3
Fully type-hinted Turso Platform API wrapper for Python.
Requires Python: >=3.8

<h1 align="center">
  TursoPy
</h1>

<p align="center">
    <em>Fully type-hinted Turso Platform API wrapper for Python.</em>
</p>

<p align="center">
<a href="https://github.com/MauriceKuenicke/tursopy/actions/workflows/cicd.yml?query=workflow%3ACICD+branch%3Amain++" target="_blank">
    <img src="https://github.com/MauriceKuenicke/tursopy/actions/workflows/cicd.yml/badge.svg?branch=main" alt="Test">
</a>
<a href="https://codecov.io/gh/MauriceKuenicke/tursopy" > 
    <img src="https://codecov.io/gh/MauriceKuenicke/tursopy/branch/main/graph/badge.svg?token=NYH162MDJD"/> 
</a>
</p>

---

**Documentation**: <a href="https://mauricekuenicke.github.io/tursopy/" target="_blank">https://mauricekuenicke.github.io/tursopy/</a>

**Source Code**: <a href="https://github.com/MauriceKuenicke/tursopy" target="_blank">https://github.com/MauriceKuenicke/tursopy</a>

---

# ⚠️ 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 TursoClient

client = 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.