Skip to content

abetkin/pony-inspect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Instalation

Please install this package in editable mode and git pull frequently

pip install -e .

Currently requires Python 3 and PostgreSQL database

Usage

The utility accepts path to pony.orm.Database object for --database argument.

For example if you have

# app/db.py

db = Database(provider='postgres', **the_rest) 

Then run

python -m introspect --database app.db.db

There are some examples in the examples dir. To run them:

cd examples
# Fill the parameters of your database connection in simple.py & corporate_directory.py
python -m introspect --database=corporate_directory.db > out/corporate_directory.py
# or
python -m introspect --database=simple.db > out/simple.py

Current limitations:

  • Many-to-many relations are not recognized, an intermediary table is generated
  • Relations to tables with a composite primary key are not generated correctly

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages