Skip to main content

Flat File Database with ORM

Project description

Welcome to Ojota’s documentation!

Ojota is a ORM and flat file database engine.

Ojota is Free Software! you can check the code at

How does it works?

First we will define the data object

# The information is stored in a file called Persons.json
class Person(Ojota):
    required_fields = ("name", "address", "age")
    cache  = Memcache()

# The information is stored in a file called Teams.yaml
class Team(Ojota):
    pk_field = "id"
    data_source = YAMLSource()
    required_fields = ("id", "name", "color")

    def __repr__(self):

Just with that we can query the ORM objects

# Some Example queries
# "all" returns all the Person Objects
# "many will return filtered results
Person.many(age=30, sorted="name")
Person.many(age__lt=30, sorted="-name")

# "one" will get only one object # you can just send the primary key"River Plate")

# You can sub-query over the results
persons = Person.all()
elders = persons.many(age__gt=30)
fat_elders = elders.many(weight__gt=50)
female_elders = elders.many(gender="F")

That’s it your information will be stored in plain text and you will have a powerfull ORM to play with it

Supported data formats

  • JSON
  • YAML
  • CSV
  • JSON through web service
  • XLS

New Features for 2.0

  • QuerySets with recursive filtering
  • “Callbacks” support (you can add custom properties with a callback function)
  • Hierarchical Objects support


With easy_install

sudo easy_install ojota

With pip

sudo pip install ojota

From source

git clone
sudo python install

Optional dependencies

  • pyyaml - To fecth the data from a file with YAML format
  • request - To fetch JSON form web sevice
  • flask – To run the example web service.

You might also want to to take a look at Ojota’s sister project called Havaiana

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for Ojota, version 3.2.1
Filename, size File type Python version Upload date Hashes
Filename, size Ojota-3.2.1-py3-none-any.whl (12.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size Ojota-3.2.1.tar.gz (10.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page