Skip to main content
# instadb 🔌

A simple and light DB python package

## Features
- query from postgres and reshift
- load data into pandas dataframe
- query from sql or filename
- automatically setup connections from env variables
- automatic query annotation
- connect timeout retry with exponential backoff

### Installation

`pip install instadb`

### Basic Usage

```python
import instadb
db = instadb.Connection(url=database_url)
df = db.dataframe("select * from users limit 10")
```

If you have env variables that match the pattern `<key>_DATABASE_URL` then you can directly do:

```python
import instadb
df = instadb.key.dataframe("select * from users limit 10")
```

### Query from file

```python
df = instadb.key.dataframe(filename='./users.sql')
```

### Query from file with arguments

users.sql
```
select * from users where limit={limit}
```

```python
df = instadb.key.dataframe(filename='./users.sql', limit=100)
```

## TODO
- [ ] load data to list
- [ ] insert and update queries
- [ ] caching


Metadata

Release files for instadb 0.4.2

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

Source distribution (sdist)

Source distribution for instadb 0.4.2
File Size Uploaded Provenance Actions
instadb-0.4.2.tar.gz 3.3 kB Without provenance Details for instadb-0.4.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for instadb 0.4.2
File Interpreter ABI Platform Actions
instadb-0.4.2-py2.py3-none-any.whl Python 2, Python 3 none any Details for instadb-0.4.2-py2.py3-none-any.whl

Total release size: 8.4 kB

Release files / instadb-0.4.2.tar.gz

Download URL instadb-0.4.2.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e2c60820af7480087343919fbe118d4b33acfb2ce8df8d25f96898e0e655cd8c
BLAKE2b-256 checksum
How to use checksums
58116db163187cd89e1842072082b5cf82cee840b9a854987c7a27db4829ffb2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / instadb-0.4.2-py2.py3-none-any.whl

Download URL instadb-0.4.2-py2.py3-none-any.whl
Size 5.1 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
16659060b9d8bc93592a12aefb59775e21cc2a1a83c769c5c0dec36aae74381c
BLAKE2b-256 checksum
How to use checksums
12ecfa0e21610e6892cfd120223645226eac5c8c642994c622d8add4017d2427
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for instadb 0.4.2

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.

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