Skip to main content

SQLBear

SQLBear is a lightweight wrapper around SQLAlchemy and Pandas to simplify SQL interactions.

Installation

pip install sqlbear

Usage

from sqlbear import SQLBear
from datetime import datetime
# Connects to sqlite database
connection_str = "sqlite:///example.db"
sqlbear = SQLBear(connection_str)
# Query account and user tables
df = sqlbear.read_sql_query("SELECT * FROM users JOIN account ON users.account = account.id WHERE lastUpdated > DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)")
# Perform some transformation
df['added_to_report'] = datetime.now()
# Write to new or existing sql table, handling new columns, mismatched sql types, timezone issues if present, and duplicates across the user_id column
nob_bear.put_table(
    'account_users',
    'user_id',
    df,
    ['id','user_id']
)

Features

  • Efficient SQL querying with progress bars

  • Automatic handling of time zones and schema updates

  • Simple table insertion and schema validation

Metadata

Release files for sqlbear 1.1.0

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

Source distribution (sdist)

Source distribution for sqlbear 1.1.0
File Size Uploaded Provenance Actions
sqlbear-1.1.0.tar.gz 20.2 kB Without provenance Details for sqlbear-1.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for sqlbear 1.1.0
File Interpreter ABI Platform Actions
sqlbear-1.1.0-py3-none-any.whl Python 3 none any Details for sqlbear-1.1.0-py3-none-any.whl

Total release size: 36.7 kB

Release files / sqlbear-1.1.0.tar.gz

Download URL sqlbear-1.1.0.tar.gz
Size 20.2 kB
Tags Source
SHA-256 checksum
How to use checksums
000ccedc588339142b310dddf16005ebbf8f84a5f8bb7b5a71efdc13e122f20a
BLAKE2b-256 checksum
How to use checksums
8324cc8e703622cd9afb020c2114539cc3c74c77c1950867be180d6838c7d6fa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / sqlbear-1.1.0-py3-none-any.whl

Download URL sqlbear-1.1.0-py3-none-any.whl
Size 16.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0558c683ab8f75c77d872b1b8bf056818725f46fa449e0e4a2b3c7f324edfeea
BLAKE2b-256 checksum
How to use checksums
85dad0aea3b501ccb136de13872f115b21fdac70ae76d5becc0873880868fc35
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Security for sqlbear 1.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.

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