Ogma: A database access code generator for Java
According to legend, he is the inventor of Ogham, the runic language in which Irish Gaelic was first written.
Ogma is a database access code generator for Java. It will take your database schema definition written in a Python-based DSL and generate (with jOOQ, among others) the necessary Java code to perform typed queries on that database.
It can also generate the necessary DDL to create the database structure according to spec.
Ogma has been written for MySQL and MariaDB, but could be made to work with other engines that are both supported by SQLAlchemy and jOOQ.
How to install
Just run the usual for a Python package:
pip install ogma
Then you can run
Code generation and other tools
Ogma obviously generates code, but it can also do other things. The tool is organized with subcommands.
generate subcommand is used to generate Java code from the model file. The model file is a Python with some restrictions and additions:
- There is an implicit import of everything from
- No imports are allowed
modelutilscontains all the code that is imported into the database model files and that internally deals with model operations.
commandscontains the entry points for the tool's subcommands
templatescontains mustache templates for jOOQ's configuration and additional generated Java code
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size ogma-0.1.0-py3-none-any.whl (26.2 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size ogma-0.1.0.tar.gz (20.8 kB)||File type Source||Python version None||Upload date||Hashes View|