Skip to main content

What Simpycity Is

Simpycity is an object-relational mapper. It seamlessly maps PostgreSQL query and function result sets to Python classes and class attributes.

It allows for the easy and rapid development of query- and stored procedure-based data representations. Simpycity leverages PostgreSQL’s powerful composite type system, and the advanced type handling of the psycopg2 database access library.

What Simpycity is Not

Simpycity is not a SQL generator and does not attempt to abstract or hide SQL. Simpycity is designed for developers who deeply understand SQL and desire to write the best possible SQL representations for their database. Simpycity also rejects the Active Record and Data Mapper paradigms, whose simplistic patterns fail in even moderately complex systems.

Core Philosophy

The core philosophy behind Simpycity is that the Database and the Application are separate entities, each with distinct abilities and design representations; this echoes the classic Object versus Relation argument. It provides a mechanism where a single business Object can easily represent several Relations, and allow the base Relational layer to follow normal forms without compromising or complicating application design.

Usage

At its simplest, object-relation mapping looks like:

--SQL
create table foo (id int, name text);
insert into foo (id, name) values (1, 'one'), (2, 'two');

#Python
class Foo(simpycity.model.SimpleModel):
    pg_type = ('public', 'foo')
    __load__ = simpycity.core.QuerySingle('foo',['id'])

my_foo = Foo(1)
print(my_foo.name)
>>>one

Read the tutorial for more narrative help.

License

Simpycity is licensed under the LGPL license, and a copy of your rights and permissions is available in the LICENSE file included in your distribution.

Contact

The official source repository is https://github.com/commandprompt/Simpycity

For support, questions, and additional help with Simpycity, please feel free to contact us on github.

Release files for Simpycity 2.0.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 Simpycity 2.0.1
File Size Uploaded
Simpycity-2.0.1.tar.gz 28.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Simpycity 2.0.1
File Interpreter ABI Platform
Simpycity-2.0.1-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 49.8 kB

Release files / Simpycity-2.0.1.tar.gz

Download URL Simpycity-2.0.1.tar.gz
Size 28.3 kB
Tags Source
SHA-256 checksum
How to use checksums
646ab8b8465d04866014c580f9dff3c46da175916fc94011efddb0904d2f8a6f
BLAKE2b-256 checksum
How to use checksums
38f0716827819be0fbf8f56212ea9669241ecba530709ec4dc69b16b249886c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / Simpycity-2.0.1-py2.py3-none-any.whl

Download URL Simpycity-2.0.1-py2.py3-none-any.whl
Size 21.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
c3e4a7f1981d7e9d151f5b19fe3f5f9b046b170d473bae032900f9443badf48f
BLAKE2b-256 checksum
How to use checksums
ebbea29aa9b7e4ed2122db0b195a73f5a6f9910f4363bbf84bb5abf6424d1053
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

2.0.1 This release

2 release files

2.0.0

2 release files

0.3.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