# ApexBase
🚀 A lightning-fast, feature-rich embedded database designed for modern Python applications.
## Features
✨ **High Performance**
- Built on DuckDB with optimized columnar storage
- Efficient batch operations support
- Automatic performance optimization
- Concurrent query execution
- Optimized for OLAP workloads
🔍 **Powerful Query Capabilities**
- SQL-like query syntax
- Complex queries with multiple conditions
- JSON field support
- Vectorized query execution
📊 **Data Framework Integration**
- Seamless integration with Pandas
- Native support for PyArrow
- Built-in Polars compatibility
🎯 **Multi-table Support**
- Multiple table management
- Easy table switching
- Automatic table creation and deletion
🛡️ **Data Integrity**
- ACID compliance
- Transaction support
- Automatic error handling
- Data consistency guarantees
🔧 **Developer Friendly**
- Simple and intuitive API
- Minimal configuration required
- Comprehensive documentation
- Extensive test coverage
## Installation
```bash
pip install apexbase
```
## Quick Start
```bash
pip install apexbase
```
```python
from apexbase import ApexClient
# Initialize the database
client = ApexClient("my_database")
# Store single record
record = {"name": "John", "age": 30, "tags": ["python", "rust"]}
id_ = client.store(record)
# Store multiple records
records = [
{"name": "Jane", "age": 25},
{"name": "Bob", "age": 35}
]
ids = client.store(records)
# Query records
results = client.query("age > 25")
for record in results:
print(record)
# Import from Pandas
import pandas as pd
df = pd.DataFrame({"name": ["Alice", "Bob"], "age": [28, 32]})
client.from_pandas(df)
```
### DuckDB Advantages
ApexBase is built on DuckDB, providing significant advantages:
- **Columnar storage** for better analytics performance
- **Efficient compression** for reduced storage footprint
- **Vectorized query execution** for faster results
- **Parallel query processing** for multi-core utilization
- **Native support for complex aggregations**
- **Optimized for both OLAP and OLTP workloads**
- **Efficient memory management** for large datasets
## Advanced Usage
### Multi-table Operations
```python
# Create and switch tables
client.create_table("users")
client.create_table("orders")
client.use_table("users")
# Store user data
user = {"name": "John", "email": "john@example.com"}
user_id = client.store(user)
# Switch to orders table
client.use_table("orders")
order = {"user_id": user_id, "product": "Laptop"}
client.store(order)
```
### Complex Queries
```python
# Multiple conditions
results = client.query("age > 25 AND city = 'New York'")
# Range queries
results = client.query("score >= 85.0 AND score <= 90.0")
# LIKE queries
results = client.query("name LIKE 'J%'")
```
### Performance Optimization
```python
# Store large batch of records
records = [{"id": i, "value": i * 2} for i in range(10000)]
ids = client.store(records)
# Optimize the database for analytics performance
client.optimize()
```
## Requirements
- Python >= 3.9
- Dependencies:
- orjson
- pandas
- pyarrow
- polars
- numpy
- psutil
- duckdb
## License
This project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.
## Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Raw data
{
"_id": null,
"home_page": null,
"name": "apexbase",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "database, embedded-database, duckdb, columnar-storage, olap, analytics, full-text-search",
"author": null,
"author_email": "Birch Kwok <birchkwok@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ee/6d/e4b8d56bd41c47960838f33785ea132fd6d7fd068194a4a937733c0a6485/apexbase-0.1.0.tar.gz",
"platform": null,
"description": "# ApexBase\n\n\ud83d\ude80 A lightning-fast, feature-rich embedded database designed for modern Python applications.\n\n## Features\n\n\u2728 **High Performance**\n- Built on DuckDB with optimized columnar storage\n- Efficient batch operations support\n- Automatic performance optimization\n- Concurrent query execution\n- Optimized for OLAP workloads\n\n\ud83d\udd0d **Powerful Query Capabilities**\n- SQL-like query syntax\n- Complex queries with multiple conditions\n- JSON field support\n- Vectorized query execution\n\n\ud83d\udcca **Data Framework Integration**\n- Seamless integration with Pandas\n- Native support for PyArrow\n- Built-in Polars compatibility\n\n\ud83c\udfaf **Multi-table Support**\n- Multiple table management\n- Easy table switching\n- Automatic table creation and deletion\n\n\ud83d\udee1\ufe0f **Data Integrity**\n- ACID compliance\n- Transaction support\n- Automatic error handling\n- Data consistency guarantees\n\n\ud83d\udd27 **Developer Friendly**\n- Simple and intuitive API\n- Minimal configuration required\n- Comprehensive documentation\n- Extensive test coverage\n\n## Installation\n\n```bash\npip install apexbase\n```\n\n## Quick Start\n\n```bash\npip install apexbase\n```\n\n```python\nfrom apexbase import ApexClient\n\n# Initialize the database\nclient = ApexClient(\"my_database\")\n\n# Store single record\nrecord = {\"name\": \"John\", \"age\": 30, \"tags\": [\"python\", \"rust\"]}\nid_ = client.store(record)\n\n# Store multiple records\nrecords = [\n {\"name\": \"Jane\", \"age\": 25},\n {\"name\": \"Bob\", \"age\": 35}\n]\nids = client.store(records)\n\n# Query records\nresults = client.query(\"age > 25\")\nfor record in results:\n print(record)\n\n# Import from Pandas\nimport pandas as pd\ndf = pd.DataFrame({\"name\": [\"Alice\", \"Bob\"], \"age\": [28, 32]})\nclient.from_pandas(df)\n```\n\n### DuckDB Advantages\n\nApexBase is built on DuckDB, providing significant advantages:\n\n- **Columnar storage** for better analytics performance\n- **Efficient compression** for reduced storage footprint\n- **Vectorized query execution** for faster results\n- **Parallel query processing** for multi-core utilization\n- **Native support for complex aggregations**\n- **Optimized for both OLAP and OLTP workloads**\n- **Efficient memory management** for large datasets\n\n## Advanced Usage\n\n### Multi-table Operations\n\n```python\n# Create and switch tables\nclient.create_table(\"users\")\nclient.create_table(\"orders\")\nclient.use_table(\"users\")\n\n# Store user data\nuser = {\"name\": \"John\", \"email\": \"john@example.com\"}\nuser_id = client.store(user)\n\n# Switch to orders table\nclient.use_table(\"orders\")\norder = {\"user_id\": user_id, \"product\": \"Laptop\"}\nclient.store(order)\n```\n\n### Complex Queries\n\n```python\n# Multiple conditions\nresults = client.query(\"age > 25 AND city = 'New York'\")\n\n# Range queries\nresults = client.query(\"score >= 85.0 AND score <= 90.0\")\n\n# LIKE queries\nresults = client.query(\"name LIKE 'J%'\")\n```\n\n### Performance Optimization\n\n```python\n# Store large batch of records\nrecords = [{\"id\": i, \"value\": i * 2} for i in range(10000)]\nids = client.store(records)\n\n# Optimize the database for analytics performance\nclient.optimize()\n```\n\n## Requirements\n\n- Python >= 3.9\n- Dependencies:\n - orjson\n - pandas\n - pyarrow\n - polars\n - numpy\n - psutil\n - duckdb\n\n## License\n\nThis project is licensed under the Apache License 2.0 - see the [LICENSE](LICENSE) file for details.\n\n## Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "A lightning-fast, feature-rich embedded database designed for modern Python applications.",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/BirchKwok/ApexBase/issues",
"Documentation": "https://github.com/BirchKwok/ApexBase#readme",
"Homepage": "https://github.com/BirchKwok/ApexBase",
"Repository": "https://github.com/BirchKwok/ApexBase"
},
"split_keywords": [
"database",
" embedded-database",
" duckdb",
" columnar-storage",
" olap",
" analytics",
" full-text-search"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "e024b6eb82bf3300dc29f1906df077a6c83e2496ca4128bba10da310e3469f7e",
"md5": "19702ea687bf0c8a58450a2e468d31fb",
"sha256": "37e93b826a492e010ec208c39d142c2c996280539e43657703366997f1f8b5bf"
},
"downloads": -1,
"filename": "apexbase-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "19702ea687bf0c8a58450a2e468d31fb",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 13127,
"upload_time": "2025-08-02T05:45:50",
"upload_time_iso_8601": "2025-08-02T05:45:50.903580Z",
"url": "https://files.pythonhosted.org/packages/e0/24/b6eb82bf3300dc29f1906df077a6c83e2496ca4128bba10da310e3469f7e/apexbase-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ee6de4b8d56bd41c47960838f33785ea132fd6d7fd068194a4a937733c0a6485",
"md5": "0d07bb633f8b6d8a8e95b2e6c009cc87",
"sha256": "95dc568c7f56c5ce3ae7efa34af20f01bc725b7ce28e1e314c6f309ed3a9e6ca"
},
"downloads": -1,
"filename": "apexbase-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "0d07bb633f8b6d8a8e95b2e6c009cc87",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 21688,
"upload_time": "2025-08-02T05:45:52",
"upload_time_iso_8601": "2025-08-02T05:45:52.320574Z",
"url": "https://files.pythonhosted.org/packages/ee/6d/e4b8d56bd41c47960838f33785ea132fd6d7fd068194a4a937733c0a6485/apexbase-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-08-02 05:45:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "BirchKwok",
"github_project": "ApexBase",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": [
[
">=",
"1.24.0"
]
]
},
{
"name": "pandas",
"specs": [
[
">=",
"2.0.0"
]
]
},
{
"name": "pyarrow",
"specs": [
[
">=",
"14.0.1"
]
]
},
{
"name": "polars",
"specs": [
[
">=",
"0.20.0"
]
]
},
{
"name": "psutil",
"specs": [
[
">=",
"5.9.0"
]
]
},
{
"name": "duckdb",
"specs": [
[
">=",
"0.9.2"
]
]
},
{
"name": "orjson",
"specs": [
[
">=",
"3.9.0"
]
]
},
{
"name": "pytest",
"specs": [
[
">=",
"7.0.0"
]
]
}
],
"lcname": "apexbase"
}