Skip to main content

Welcome to Ojota’s documentation!

Ojota is a ORM and flat file database engine.

Ojota is Free Software! you can check the code at https://github.com/MSA-Argentina/ojota

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):
        return self.name

Just with that we can query the ORM objects

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

# "one" will get only one object
Team.one(1) # you can just send the primary key
Team.one(name="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

  • DSON

  • 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

Installation

With easy_install

sudo easy_install ojota

With pip

sudo pip install ojota

From source

git clone https://github.com/MSA-Argentina/ojota.git
sudo python setup.py install

Optional dependencies

  • pyyaml - To fecth the data from a file with YAML format

  • dogeon - To fecth the data from a file with DSON 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 http://havaiana.rtfd.org

Metadata

Release files for Ojota 3.3.1

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

Source distribution (sdist)

Source distribution for Ojota 3.3.1
File Size Uploaded
ojota-3.3.1.tar.gz 12.9 kB Details

Built distribution (wheel)

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

Total release size: 27.9 kB

Release files / ojota-3.3.1.tar.gz

Download URL ojota-3.3.1.tar.gz
Size 12.9 kB
Tags Source
SHA-256 checksum
How to use checksums
69cce51353affe574fb469686ca56b6e00b1cb3f568e2ea953c2f0bb76bbf3d9
BLAKE2b-256 checksum
How to use checksums
6219a0ae72d831df659c09aeac3794956019e1ea86e0ffc709f0b863e4ebf358
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release files / ojota-3.3.1-py3-none-any.whl

Download URL ojota-3.3.1-py3-none-any.whl
Size 15.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ba5ea3e4c8d6d75cba6f541488104547d18ea860b64a85f6dd9545bec9309043
BLAKE2b-256 checksum
How to use checksums
5f8ddee1807cc2ef9ea433c0d9feb2f4a8316f860f8f8483c6b2b185195ccfb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.10.12

Release history Release notifications | RSS feed

This release

3.3.1 This release

2 release files

3.3.0

2 release files

3.2.1

2 release files

3.2

3 release files

3.1.2

1 release file

3.1.1

1 release file

3.1.0

1 release file

3.0.0

1 release file

2.1.0

1 release file

2.0.3

1 release file

2.0.1

1 release file

2.0.0

1 release file

1.1.0

1 release file

1.0.0

1 release file

0.4.4

1 release file

0.4.3

1 release file

0.4.2

1 release file

0.4.1

1 release file

0.4.0

1 release file

0.3.3

1 release file

0.3.2

1 release file

0.3.1

1 release file

0.3.0

1 release file

0.2.2

1 release file

0.2.1

1 release file

0.2.0

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.2

1 release file

0.1.1

1 release file

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