Ogma: A database access code generator for Java
Project description
Ogma
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 ogma.
Code generation and other tools
Ogma obviously generates code, but it can also do other things. The tool is organized with subcommands.
Generation
The 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
modelutils - No imports are allowed
For Developers
Structure
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 subcommandstemplatescontains mustache templates for jOOQ's configuration and additional generated Java code
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ogma-0.1.0.tar.gz.
File metadata
- Download URL: ogma-0.1.0.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.16 CPython/3.6.8 Linux/4.18.0-22-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3502eb30f7ed0986ecd349e76f2bdf9fd50128000ff58f8349f28651fd3744a8
|
|
| MD5 |
a67bdb7f2e19e80a683ed59ffe55b52a
|
|
| BLAKE2b-256 |
3f2720bb14202766109a240499d6d44e658dfc992e81f4aac9f75aafeefb521f
|
File details
Details for the file ogma-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ogma-0.1.0-py3-none-any.whl
- Upload date:
- Size: 26.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/0.12.16 CPython/3.6.8 Linux/4.18.0-22-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3ebd4571028ecc240b5f723861ca70e8c80dd6ff16278b517e854cc375e471c9
|
|
| MD5 |
21460670015e6e80294ac7923c77ce89
|
|
| BLAKE2b-256 |
cde38e0b964f969d5dad66633fef5bdf5bc9ff9d82cc9653f1150920327ffdb8
|