Stealth-oriented utilities for web scraping with rotating user agents, proxies, and Selenium helpers.
Project description
SQLite Forge
SQLite Forge is a lightweight toolkit that helps you declare and maintain SQLite tables from Python. Define your schema once, then manage tables, run queries, ingest pandas DataFrame objects, and export results.
Highlights
- Declarative table definitions with schemas and optional multi-column primary keys
- Safe helpers to create/drop tables and check existence
- DataFrame ingestion with optional incremental overwrite support
- Query execution that returns pandas
DataFrameobjects - Table export helpers for
csv,json, andparquet
Installation
pip install sqlite-forge
For development:
git clone https://github.com/Tom3man/sqlite-forge.git
cd sqlite-forge
poetry install --with dev --with docs
Quick Start
from pathlib import Path
import pandas as pd
from sqlite_forge import SqliteDatabase
class ExampleTable(SqliteDatabase):
DEFAULT_PATH = "example_table"
PRIMARY_KEY = ("id",)
DEFAULT_SCHEMA = {
"id": "INTEGER",
"name": "TEXT",
"score": "REAL",
}
db = ExampleTable(database_path=Path("./data"))
db.create_table(overwrite=True)
db.ingest_dataframe(
pd.DataFrame(
[
{"id": 1, "name": "Alice", "score": 9.2},
{"id": 2, "name": "Bob", "score": 8.7},
]
)
)
print(db.fetch_table())
db.export_table("./data/example_table.csv", format="csv")
Development
poetry run pytest
poetry run ruff check .
poetry run mypy
poetry build
Documentation
- Docs site: https://tom3man.github.io/sqlite-forge/
- Build locally:
poetry run mkdocs serve
Release
- Bump version in
pyproject.toml. - Update
CHANGELOG.md. - Publish:
poetry publish --build
Changelog
See CHANGELOG.md.
Licence
MIT. See LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orbweaver_tools-1.3.5.tar.gz.
File metadata
- Download URL: orbweaver_tools-1.3.5.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.17.0-14-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f797fefd5bca10a998b84ad25440a7e8fc5422c199d4db276ba4e15649af4d4e
|
|
| MD5 |
2239068d7555ffc3a5897a709929a5b7
|
|
| BLAKE2b-256 |
0396de87c62b93cb4e61c6bf3b324a1310d89946550bc319b819236ced0f1b43
|
File details
Details for the file orbweaver_tools-1.3.5-py3-none-any.whl.
File metadata
- Download URL: orbweaver_tools-1.3.5-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.12.3 Linux/6.17.0-14-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1a79a81df60f0248285887a0ca6b5ad27134c33db60d8bff17c512b620202e6
|
|
| MD5 |
280d05ff2d03a90fb29e89b846c0015c
|
|
| BLAKE2b-256 |
a623c3f51264839ebcfa3bf870284aa630282e6f8bd9268b3b53f60657d90bcb
|