Skip to main content

Pica DBAPI ๐ŸŽ‰

Welcome to Pica DBAPI - a lightweight and fun Pandas Integrated CSV API!
Pica stands for Pandas Integrated CSV API.

Features ๐ŸŒŸ

  • Lightweight DBAPI built on Pandas and CSV ๐Ÿ“Š
  • Simple and intuitive API ๐Ÿคฉ
  • Supports common SQL operations: SELECT, INSERT, UPDATE, DELETE, JOIN, GROUP BY ๐Ÿ› ๏ธ
  • Automatic lazy-loading of CSV files ๐Ÿš€
  • CREATE TABLE and DROP TABLE operations ๐Ÿ—ƒ๏ธ
  • Comprehensive test coverage with pytest โœ…

Installation ๐Ÿ”ง

pip install pica-dbapi

Supported SQL Operations ๐Ÿ“

Pica supports the following SQL operations:

  • SELECT: Retrieve data from CSV files. ๐Ÿ”
  • INSERT: Insert new records into CSV files. โž•
  • UPDATE: Update existing records in CSV files. ๐Ÿ”„
  • DELETE: Delete records from CSV files. โŒ
  • JOIN: Join rows from multiple CSV files. ๐Ÿ”—
  • GROUP BY: Aggregate records using GROUP BY clauses. ๐Ÿ“Š
  • CREATE TABLE: Create a new CSV file with specified columns. ๐Ÿ†•
  • DROP TABLE: Delete the CSV file and remove the corresponding table object. ๐Ÿ—‘๏ธ

Quick Start ๐Ÿš€

Below is a quick start guide demonstrating key features (as shown in example_basic.py):

# Clone the repository ๐Ÿ“ฅ
git clone https://github.com/kitfactory/pica.git
cd pica

# Create a virtual environment and install dependencies ๐Ÿ› ๏ธ
python -m venv .venv
# On Windows:
.venv\Scripts\activate
# On Unix/Linux:
# source .venv/bin/activate

# Install Pica in editable mode ๐Ÿ”ง
pip install -e .

# Run the example โ–ถ๏ธ
python example/example_basic.py

This example demonstrates various features including:

  • Basic SELECT with WHERE clause ๐Ÿ”
  • GROUP BY with aggregation ๐Ÿ“Š
  • JOIN operations between CSV-backed tables ๐Ÿ”—
  • Direct usage with Pandas DataFrame ๐Ÿผ
  • Automatic lazy-loading of CSV files when initial DataFrames are not provided ๐Ÿš€
  • CREATE TABLE and DROP TABLE functionalities ๐Ÿ—ƒ๏ธ ๐Ÿ—‘๏ธ

Contributing ๐Ÿค

Contributions and suggestions are welcome! Please open an issue or submit a pull request. ๐Ÿ’ฌโœจ

License ๐Ÿ“„

This project is licensed under the MIT License.

Release files for pica-dbapi 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 pica-dbapi 0.1.3
File Size Uploaded
pica_dbapi-0.1.3.tar.gz 30.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pica-dbapi 0.1.3
File Interpreter ABI Platform
pica_dbapi-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 51.7 kB

Release files / pica_dbapi-0.1.3.tar.gz

Download URL pica_dbapi-0.1.3.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a5f62084117b39c56eb7b511668159b00c175c7d5bfb66b01e380b8655820743
BLAKE2b-256 checksum
How to use checksums
7494104b7a0306ff54510f55cfe65719f28385c40cd56268fc21a27f2397940b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.14

Release files / pica_dbapi-0.1.3-py3-none-any.whl

Download URL pica_dbapi-0.1.3-py3-none-any.whl
Size 21.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9bc95de4d4567005727a1fa463fa2a15945379c397368a7a03e0e9f674395f80
BLAKE2b-256 checksum
How to use checksums
c97b80a2ec5640d4c2b1597aaa73c30261e8d9ca8a5839e82035ecae86c3877b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.10.14

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

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