Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Python small, little, mini, tiny, micro Object-Relational Mapping (ORM)

Project description

Perseus MicrORM

Majormode Perseus MicrORM Python Library is a small, little, mini, tiny, micro Object-Relational Mapping (ORM).

MicrORM is not a object-relational mapping in the sense it maps Pyth objects to a Relational DataBase Management System (RDBMS), but in the sense it maps results of SQL queries, executed on a RDBMS, to Python objects.


To install Perseus MicrORM Python Library, simply enter the follow command line:

pip install perseus-microrm-library


import uuid

from majormode.perseus.utils import cast
from majormode.perseus.utils.rdbms import RdbmsConnection

    None: {
        'rdbms_hostname': 'localhost',
        'rdbms_port': 5432,
        'rdbms_database_name': 'foo',
        'rdbms_account_username': 'dbo',
        'rdbms_account_password': ''


with RdbmsConnection.acquire_connection(
        connection=None) as connection:
    cursor = connection.execute(
        SELECT place_id,
               ST_X(location) AS longitude,
               ST_Y(location) AS latitude,
               ST_Z(location) AS altitude,
          FROM place
          WHERE place_id IN %[place_ids]s
            'place_ids': PLACE_IDS 
    rows = cursor.fetch_all()

    places = [
            'place_id': cast.string_to_uuid,
            'creation_time': cast.string_to_timestamp})
        for row in cursor.fetch_all()]

    for place in places:
        print(place.place_id, place.longitude, place.latitude)

Project details

Download files

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

Files for perseus-microrm-library, version 1.1.9
Filename, size File type Python version Upload date Hashes
Filename, size perseus_microrm_library-1.1.9-py3-none-any.whl (13.3 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size perseus-microrm-library-1.1.9.tar.gz (11.6 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page