Lightweight file-system database for Python projects.
Project description
pyfiles_db
Lightweight file-system database for Python projects
PRE RELISE FIRST VERSION OF PYFILES_D
About
pyfiles_db is a lightweight and fast library that allows using the file system as a database for Python projects. It is minimalistic, requires no full-fledged DBMS, and is ideal for small to medium projects where simplicity and speed are priorities, and when system resources are a concern. It is built on top of aiofiles which allows you to use the file system as a database without any server required. Also can with synchronous mode.
Features
- Store data directly in folders and files (no server required)
- Simple API — quick to start
- Supports basic CRUD operations: Create, Read, Update, Delete
- Minimal external dependencies
- Designed for easy integration and flexibility
Installation
pip install pyfiles_db
Quick Start
from pyfiles_db import FilesDB
file_db = FilesDB()
db = file_db.init_async() # Or file_db.init_sync() for sync mode
# storage - path to database location, if is None use default path.
db.craeate_table(
"users",
columns={
"id": "INT",
"name": "TEXT",
"age": "INT",
},
id_generator="id", # required unical value of table, if None use generator for auto increment.
)
db.new_data(table_name="usesr", data={
"id": 1,
"name": "Anton",
"age": 17,
})
db.new_data(table_name="users", data={
"id": 2,
"name": "Alex",
"age": 17,
})
user_id_1 = db.find("usesr", "id == 1")
# return [{"1": {"id": 1, "name": "Anton", "age": 17}}]
user_id_2 = db.find("usesr", "id == 2")
# return [{"2": {"id": 2, "name": "Alex", "age": 17}}]
users_age_17 = db.find("users", "age == 17")
# return [
# {"1": {"id": 1, "name": "Anton", "age": 17}},
# {"2": {"id": 2, "name": "Alex", "age": 17},
# ]
Use Cases
- Quick startups, prototypes, MVPs
- Lightweight web applications, scripts, utilities
- Projects not requiring a heavy DBMS
- Personal projects and data analysis tools
- low RAM and processor characteristics
Best Practices & Limitations
- Not designed for high-load systems with thousands of requests per second
- Maintain folder structure carefully to avoid naming collisions
- As this uses the file system, consider transaction/concurrency limitations
- Regularly back up the path folder
Contribution
Feedback, issues, and pull requests are welcome! Follow the contribution guidelines if available. Ensure your code is tested (tests in /tests/) and document changes.
License
This project is licensed under the Apache-2.0 License. See LICENSE for details.
Other
CODE_OF_CONDUCT
CONTRIBUTING
Project details
Release history Release notifications | RSS feed
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 python_files_db-0.0.1a3.tar.gz.
File metadata
- Download URL: python_files_db-0.0.1a3.tar.gz
- Upload date:
- Size: 12.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad1d4862836390059bcb218cc21248779e34267f4d5d29f33800517b9758b71a
|
|
| MD5 |
3c01758b4ce487fc04048cac67134af2
|
|
| BLAKE2b-256 |
35c3d026f51e8a1b464e7c79775347ad027d3b803946a0ab47df56e08b229a9f
|
Provenance
The following attestation bundles were made for python_files_db-0.0.1a3.tar.gz:
Publisher:
publish.yml on LangNeuron/pyfiles_db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_files_db-0.0.1a3.tar.gz -
Subject digest:
ad1d4862836390059bcb218cc21248779e34267f4d5d29f33800517b9758b71a - Sigstore transparency entry: 648595761
- Sigstore integration time:
-
Permalink:
LangNeuron/pyfiles_db@df265b7513633ced6dc830e829ab4b9706c49024 -
Branch / Tag:
refs/tags/0.0.1-alpha.3 - Owner: https://github.com/LangNeuron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@df265b7513633ced6dc830e829ab4b9706c49024 -
Trigger Event:
release
-
Statement type:
File details
Details for the file python_files_db-0.0.1a3-py3-none-any.whl.
File metadata
- Download URL: python_files_db-0.0.1a3-py3-none-any.whl
- Upload date:
- Size: 23.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
889917762a3c908295d4ffab0b1bcd64e9fd2f239ae614edbd2e6b553750cbbc
|
|
| MD5 |
5390cb16512a9dc5d94716685624e137
|
|
| BLAKE2b-256 |
bbe1b334966e238eff94411bac61e2a0e8db37e791511795c98acce3c2181113
|
Provenance
The following attestation bundles were made for python_files_db-0.0.1a3-py3-none-any.whl:
Publisher:
publish.yml on LangNeuron/pyfiles_db
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_files_db-0.0.1a3-py3-none-any.whl -
Subject digest:
889917762a3c908295d4ffab0b1bcd64e9fd2f239ae614edbd2e6b553750cbbc - Sigstore transparency entry: 648595767
- Sigstore integration time:
-
Permalink:
LangNeuron/pyfiles_db@df265b7513633ced6dc830e829ab4b9706c49024 -
Branch / Tag:
refs/tags/0.0.1-alpha.3 - Owner: https://github.com/LangNeuron
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@df265b7513633ced6dc830e829ab4b9706c49024 -
Trigger Event:
release
-
Statement type: