simple, fast memory-based DBMS
Project description
FoxLin
simple, fast, funny column based dbms on python
philosophy
Foxlin is developed to create the best User experience of DBMS interface for mini projects it is fast because use of numpy array for contain columns data in memory and using pydantic for manage data in program
also have powerfull process managers.
feature
- simple & fast
- friendly ux
- auto backup
- nosql structure
- power full query tool based on sql concept
- logging
- async #TODO in 1.1
- smart cache system # TODO in 1.2
- query cache system # TODO in 1.2
Quick access :
requirements
- numpy
- pydantic
- orjson
Table Structure
TODO
installation
from pypi
$ pip install foxlin
from github
$ git clone https://github.com/MisanoGo/FoxLin && cd FoxLin
$ pytest # run tests
$ pip install -e setup.py
simple usage :
from foxlin import FoxLin, Schema, column
class MyTable(schema):
# define your teble schema
name: str = column(dtype=str)
age: int = column(dtype=int)
username: str = column(uniqe=True, dtype=str)
password: str = column(dtype=str)
db = FoxLin('./db.json', MyTable) # create db
data = [
MyTable(name='brian', age=37, username='biran1999', password='123456789')
MyTable(name='sobhan', age=20, username='misano', password='#197382645#'),
MyTable(name='Tommy', age=15, username='god_of_war', password='123QWEasdZXC')
MyTable(name='Ali', age=20, username='p_1969_q', password='@QWE123KFH@')
]
with db.session as db_session:
db_session.insert(*data)
# auto commit in the end of context manager
query = db.query
record = query.where(query.age > 17, query.name == 'Ali').order_by(query.age).first()
print(record.name, record.username, record.password)
Note
- every crud operation on db has O(record_count * column_count) order
FoxLin Story
Sophy was a curious girl, always looking to learn and explore new things. One day, she found herself surrounded by a dense forest, enchanted by the beauty and mystery it held.
As she walked further into the woods, she stumbled upon a Fox named Lin. Unlike other animals that would normally run away, Lin was as curious as Sophy was. Struck by their shared curiosity, they started talking.
Sophy soon realized that Lin was not just any fox but an intelligent fox with considerable knowledge in the world of data. Excited by this, Sophy began asking Lin questions, eager to learn as much as she could.
As they continued their conversation, they stumbled upon a huge database hidden in the forest that no one else had any idea about. Together, they navigated the vast expanse of knowledge within the database, reading and learning so many new things.
Sophy and Lin lost track of time, as they quenched their thirst for knowledge in this world of data.
As they walked back towards their homes, both of them were overcome with a sense of fulfillment and satisfaction. They realized that the world was full of secrets waiting to be unraveled, and it was up to them to quench their thirst for knowledge and explore all the possibilities.
From that day on, Sophy and Lin would often visit the database and other places together, learning new things and exploring the world of data. They knew that knowledge had no limit and that there was always something new to discover, and it was this knowledge that would bring them closer every day. (generated by ai).
my experience from this project
- in operations with high order, when have many static if,else(no change in all of program) it's better to split their by classes and use factory clasess for select own usefull class, etc : columns.py:column
TODO
TODO in 1.0
- crud
- level base operation manager
- self log system
- session model
- transaction but by grouping commits not ACDI
- write test
- benchmarck test
- add logs to .logs file
- define logs in operation statment and able to setting by user
- generate logs
- quering
- auto backup
TODO at 1.1
- asynchronus
- transaction ACDI
- define Group By & HAVING
- log time duration of operation's
- migrate
- stub
- data compretion
TODO at 1.2
- memory cache system
- query cache system
- session privilege's
- multi table
- ...
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
File details
Details for the file foxlin-0.1.2.tar.gz
.
File metadata
- Download URL: foxlin-0.1.2.tar.gz
- Upload date:
- Size: 25.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.13 Linux/6.5.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 379ed65433cdb863309e5c886a299919d156cc9b998d2a004bdff5e84d7214e9 |
|
MD5 | 13192e4584da1943765a2c2a22389714 |
|
BLAKE2b-256 | c91d5a4d07a00f300fc4295c4624acbbfd992182d5c899e32ad835f787370fa7 |
File details
Details for the file foxlin-0.1.2-py3-none-any.whl
.
File metadata
- Download URL: foxlin-0.1.2-py3-none-any.whl
- Upload date:
- Size: 28.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.10.13 Linux/6.5.0-1022-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10eadb4d1f44cc325cac9b00eee6b50e2dabfbb2d4b1e4f97016f753a41a0968 |
|
MD5 | 0175ff2dbf87b45aef7518cdaea209b5 |
|
BLAKE2b-256 | 83019b491d6e27690cceb3820fa09b9a10270c185741629d1254c2c11871ad64 |