Skip to content

Emit07/piuma

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

64 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Piuma

An ultra-lighweight document oriented database

Code style: black

Piuma is a lightweight Python library that provides a simple document-oriented interface layer with pluggable storage backends. Piuma is designed around a minimal and flexible core that makes it easy to:

  • work with structured and document-like data
  • swap or extend storage implementations
  • build custom database behaviors

Out of the box, Piuma can be used as a small memory or file backed document store. However, its primary design goal is to serve as a foundation for building more complex or specialized database systems. Piuma has three core structural principles: minimal design, extensibility, compositional architecture.

Quick Links

Use Cases

Piuma works well in situations where you want a lightweight and embeddable data layer.

  • Building prototypes or experimental data systems
  • Adding simple document storage to Python applications
  • Creating a custom persistence layer without adopting a full database
  • Flexibility in rapid development
  • Testing environments

Installing

Piuma is on PyPi and can be installed with PyPi:

$ pip install piuma

Piuma can also be installed by cloning the Github repository and using:

$ pip install .

Getting Started

Once installed, you can setup Piuma and insert your first Document.

from piuma import Piuma

piuma = Piuma()
piuma.insert({"name": "Che Guevara", "age": 39})

Extensibility Example

Piuma is designed so storage can be swapped or extended.

from piuma.storage import JSONStorage
from piuma import Piuma

storage = JSONStorage("data/db.json")
db = Piuma(storage=storage)

Custom storage backends can be implemented by extending Storage.

Why is it called Piuma?

Piuma (‹più·ma›) is the Italian word for feather, which reflects the design goals.

About

A lighweight document oriented database interface written in python

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages