glacierdb
Premier driver Python pour le daemon ogd, sans modification de og-core.
Il utilise directement le protocole officiel TCP/NDJSON v1 : une requête JSON par ligne, une réponse JSON par ligne.
Installation locale
cd glacierdb
python -m pip install -e '.[pandas]'
Démarrer OG dans un autre terminal :
cargo run --bin ogd
Requêtes
import glacierdb
with glacierdb.connect("127.0.0.1:7878") as db:
result = db.execute("from users | where age >= 18")
print(result.documents)
print(result.statistics)
frame = db.query_df("from users")
Charger un CSV par chunks
import glacierdb
with glacierdb.connect() as db:
result = db.load_csv(
"users",
"users.csv",
chunk_size=10_000,
)
print(result)
Alias pratique :
result = db.load("users", "users.csv", chunk_size=10_000)
Charger un DataFrame Pandas
import pandas as pd
import glacierdb
frame = pd.DataFrame([
{"name": "Ada", "age": 36},
{"name": "Grace", "age": 85},
])
with glacierdb.connect() as db:
result = db.load("users", frame, chunk_size=1_000)
None, pd.NA et NaN sont convertis en null. Les dates sont converties
en ISO 8601.
Charger un itérateur
def documents():
yield {"name": "Ada"}
yield {"name": "Grace"}
result = db.load("users", documents(), chunk_size=500)
Limite de cette v0.1
Le protocole OG v1 accepte une requête à la fois et la syntaxe actuelle de
insert insère un document. Le driver effectue donc un aller-retour par ligne.
Le chunk_size borne la mémoire de lecture CSV/Pandas, mais ne constitue pas
encore un insert réseau groupé. Un futur protocole de batch pourrait accélérer
le chargement sans changer cette API Python.
Metadata
Release files for glacierdb 0.1.0
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 | |
|---|---|---|---|---|
| glacierdb-0.1.0.tar.gz | 26.5 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| glacierdb-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 55.8 kB
Release files / glacierdb-0.1.0.tar.gz
| Download URL | glacierdb-0.1.0.tar.gz |
|---|---|
| Size | 26.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4afc9f96c5b8b4b0da58bf0052d1b0c3f315d423e5f88841682fad1cf93ab469
|
|
BLAKE2b-256 checksum How to use checksums |
214ea53220697b5c7cd4bc19b5ddde956090e42a711d5c0146f2b6f0b380e585
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / glacierdb-0.1.0-py3-none-any.whl
| Download URL | glacierdb-0.1.0-py3-none-any.whl |
|---|---|
| Size | 29.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bb1f79b2e4e5125c3e784ea6da204d39d733a2479cbab72bb2729993b47f9f63
|
|
BLAKE2b-256 checksum How to use checksums |
780e6a6c4668bcfcf66f9cb8bafc1ca76d127ac468b5ec06b68852dd74def8a4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Security for glacierdb 0.1.0
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.