Skip to main content

asql

Query a database in natural language. Uses docker images from https://github.com/paulfitz/mlsql - make sure Docker RAM limits are not too restrictive (should be above 3GB).

Installation

  • pip install asql to work with Sqlite or CSV files.
  • pip install asql[postgres] to work with PostgreSQL databases.
  • pip install asql[mysql] to work with MySQL databases.
  • For other databases, see SQLAlchemy supported dialects.

Use

Tell asql which model to use:

# pick one of these
asql --docker sqlova
asql --docker valuenet

I suggest you start with just one of these, although you can start both. The sqlova model works on single tables (e.g. a csv file) and can handle queries that take parameters. The valuenet model works on many tables, but is less strong at queries that take parameters.

Tell asql which data to use:

$ pick one of these
asql --db your_data.csv
asql --db your_data.sqlite
asql --db postgres://user:password@host/database
asql --db mysql://user:password@host/database

Don't use on an enormous database just yet.

Now, ask whatever questions you like in plain English, and see what happens:

asql how many players are there?
asql which is the longest bridge?

Metadata

Release files for asql 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for asql 0.1.3
File Size Uploaded Provenance
asql-0.1.3.tar.gz 5.4 kB Without provenance Details

Release files / asql-0.1.3.tar.gz

Download URL asql-0.1.3.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f5f61608e378b521dc33d8888591d8ed01f6772801a783432c2d5a68934d4d2b
BLAKE2b-256 checksum
How to use checksums
64adc4110137ff21ec944b72cda97beb55290e5f532ae5d9b7719c108208bfbb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.4

Security for asql 0.1.3

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.

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page