Skip to main content

FileXdb-Python

FileXdb is a lightweight local NoSQL database, optimized for best coding experience.

It's written in Core Python and has no external dependencies. The target is to reduce the complexity of installing external SQL Database & data handling.

FileXdb is:

  • A local, File-based, lightweight, horizontally scaled NoSQL Database.
  • Designed to be simple and interesting to use by providing simple and clean APIs.
  • A Collection & Document oriented approach.
  • Works on all modern versions of Python and PyPy.

Supported Python Versions

Since newer versions of Python are often faster, have more features and are better supported, the latest version of Python 3 is recommended for FileXdb. You may use it on older versions as well.

Installation

Install FileXdb using pip :

Windows:

python -m pip install filexdb

Linux / MAC:

python3 -m pip install filexdb

Getting Start

from filexdb import FileXdb

db = FileXdb("db-name", "path/to/data/dir")
new_coll = db.collection("collection-name")

new_coll.insert({"name": "Sam", "skills": ["Python", "C++"]})

Insert Multiple Documents

data = [
    {
        "name": "Jack",
        "dept": "CSE"
    },
    {
        "name": "Rocky", 
        "address": {
            "PO": "Bongaon", 
            "PS": "Kolkata"
        }, 
        "skills": [
            "Game Dev"
        ]
    },
    {
        "name": "Rahul"
    }
]

new_coll.insert_all(data)           # `data` should be a List of  JSON Object

Find Documents

query = {"name": "Sam"}

# Returns all Documents.
new_coll.find()  

# Returns all Documents matches the ``_query``.
new_coll.find(query=query)  

# Returns doc[1] to doc[2] matches the ``_query``.
new_coll.find(query=query, limit=(1, 3))  

# Returns doc[1] to doc[9] of all Documents.
new_coll.find(limit=(3, 50))

Update Documents

query = {
    "name": "Rocky"
}

updated_data = {
    "name": "Rocky Bhai",
    "skills": [
        "Game Dev", 
        "C++", 
        "Python"
    ]
}

new_coll.update(updated_data, query)

Delete Documents

query = {
    "name": "Rocky Bhai", 
    "dept": "ECE"
}

new_coll.delete(query)

More Features

FileXdb is in Beta stage. Currently we have above features only. We will come back to you with other advanced features soon.

You may also contribute in this journey.

Contributing

Thank you for investing your time in contributing to our project! Whether it's a bug report, new feature, correction, or additional documentation, we greatly value feedback and contributions from our community. Any contribution you make will be reflected on github.com/FileXdb/FileXdb-Python✨.

Contributions to FileXdb are welcome! Here's how to get started:

  • Open an issue or find for related issues to start a discussion around a feature idea or a bug.
  • Fork the repository on GitHub.
  • Create a new branch of the master branch and start making your changes.
  • Make a meaning-full commit.
  • Write a test, which shows that the bug is fixed or the feature works as expected.
  • Send a pull request and wait until it gets merged and published.

Metadata

Release files for filexdb 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for filexdb 1.0.2
File Size Uploaded
filexdb-1.0.2.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for filexdb 1.0.2
File Interpreter ABI Platform
filexdb-1.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 25.5 kB

Release files / filexdb-1.0.2.tar.gz

Download URL filexdb-1.0.2.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
de64e2db72acb4b7e50853e1da80db900df81fd5be17b7232b478238bcffd6ce
BLAKE2b-256 checksum
How to use checksums
84039a48c94974f242c5e19270b86d9a274aa50e45e1d6ea60d658e1ed6356d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.2

Release files / filexdb-1.0.2-py3-none-any.whl

Download URL filexdb-1.0.2-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7eed590084f4ddca0d7dbd35a60f835e63d9ee85e9cb243b2fb58fed1d9ccf17
BLAKE2b-256 checksum
How to use checksums
6cab72bd9130b0be95de648868a51bafe3957ba98f79b156cbced56566b1ad6c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.10.2

Release history Release notifications | RSS feed

This release

1.0.2 This release

2 release files

1.0.1

2 release files

1.0.0

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