Skip to main content

Database First Code Generator that uses the SQL Alchemy and Jinja2

Project description

Database First Code Generator that uses the [SQL Alchemy][sqlalchemy] and [Jinja2][jinja2]

### It's Just Code - Generate It

*itsjustcode* is intended to generate code from Jinja templates using SQL Alchemy's metadata. If
you are looking for a library to generate class models from an existing database, this isn't
it ... try [sqlacodegen][sqlacodegen]. *itsjustcode* is inteded to provide boilerplate code from templates to flesh out HTML files, or baseline javascript files for any number of available JavaScript frameworks (or TypeScript).

At the present moment, *itsjustcode* requires access to an existing database where it has been
created via SQL Alchemy models (or created with regular SQL scripts). *itsjustcode* uses SQL Alchemy
to access the metadata of a database in a conistent manner.

### Sample Usage

Also check out the [samples][samples] folder for templates, and outputs. It's just code
is intended to be integrated into a developer's workflow, as deemed by the project so
there isn't a hard lined approach as to its integration.

# generic sample
from itsjustcode import generateit


# generic cmd line implementation sample
import argparse

from itsjustcode import generateit

parser = argparse.ArgumentParser()
parser.add_argument('--table', action='store', dest='table')
parser.add_argument('--template', action='store', dest='template')
args = parser.parse_args()

out_file = 'my_proj/application/' + args.template

template_file=args.template + '.j2',

# ** .j2 just gives the template another extesion (check samples for examples)

# generic cmd line sample
$> python --table table_name --template framework/file.extension


Keywords: codegenerator development
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Plugins
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Code Generators
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.6
Description-Content-Type: text/markdown

Project details

Download files

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

Source Distribution

itsjustcode-0.2.tar.gz (3.7 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page