ibis-datasette provides a datasette backend for ibis. This lets you query any datasette server using a familiar dataframe-like API (rather than SQL).
Installation
ibis-datasette is available on pypi:
$ pip install ibis-datasette
Usage
Once installed, you can connect to any datasette server using the ibis.datasette.connect function. This takes the full URL to a database For example, to connect to the legislators database.
In [1]: import ibis
In [2]: con = ibis.datasette.connect("https://congress-legislators.datasettes.com/legislators")
Once connected, you can interact with tables using ibis just as you would a local sqlite database:
In [3]: ibis.options.interactive = True # enable interactive mode
In [4]: con.list_tables()
Out[4]:
['executive_terms',
'executives',
'legislator_terms',
'legislators',
'offices',
'social_media']
In [5]: t = con.tables.legislators # access the `legislators` table
In [6]: t.name_first.topk(5) # top 5 first names for legislators
Out[6]:
name_first count
0 John 1273
1 William 1024
2 James 721
3 Thomas 457
4 Charles 442
LICENSE
New BSD. See the License File.
Metadata
Release files for ibis-datasette 0.2.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| ibis-datasette-0.2.2.tar.gz | 24.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ibis_datasette-0.2.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 32.3 kB
Release files / ibis-datasette-0.2.2.tar.gz
| Download URL | ibis-datasette-0.2.2.tar.gz |
|---|---|
| Size | 24.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a9b79b57e1dde502ae61fd575bd9a3b33a240b13ce6053e9df09d7da6bbe48a4
|
|
BLAKE2b-256 checksum How to use checksums |
fafc06c3546b2024fb2ef90f57c1301bb3cce8aaf4133a05ba289c5979c002a1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|
Release files / ibis_datasette-0.2.2-py2.py3-none-any.whl
| Download URL | ibis_datasette-0.2.2-py2.py3-none-any.whl |
|---|---|
| Size | 7.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7f5a009a17518754b24be3801342481314f792801e22e889bea027fb3aab4a07
|
|
BLAKE2b-256 checksum How to use checksums |
49bf019a38e6649a503ce71cb19540157e13f5f61210ee9e64bc92d7a8ca6fd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.13
|