https://github.com/tecnickcom/pygen
Command-line tool to generate Python applications and libraries
https://github.com/tecnickcom/pygen
application biolerplate code example generator library python service template
Last synced: 9 months ago
JSON representation
Command-line tool to generate Python applications and libraries
- Host: GitHub
- URL: https://github.com/tecnickcom/pygen
- Owner: tecnickcom
- License: mit
- Created: 2018-03-06T09:03:08.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-02-01T10:30:29.000Z (almost 6 years ago)
- Last Synced: 2025-04-02T22:51:16.615Z (10 months ago)
- Topics: application, biolerplate, code, example, generator, library, python, service, template
- Language: Python
- Size: 84 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# pygen
*Command-line tool to generate Python services, applications and libraries with reusable logic.*
[](https://travis-ci.org/tecnickcom/pygen?branch=master)
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20pygen%20project)
*Please consider supporting this project by making a donation via [PayPal](https://www.paypal.com/cgi-bin/webscr?cmd=_donations¤cy_code=GBP&business=paypal@tecnick.com&item_name=donation%20for%20pygen%20project)*
* **category** Tool
* **author** Nicola Asuni
* **copyright** 2014-2019 Nicola Asuni - Tecnick.com LTD
* **license** MIT (see [LICENSE](LICENSE))
* **link** https://github.com/tecnickcom/pygen
## Description
This is a command-line tool to quickly generate Python services, applications and libraries with a common set of features and reusable logic.
For an equivalent project in Go (golang) please check [GoGen](https://github.com/tecnickcom/gogen).
Each Python project built with this tool adheres to the set of conventions detailed in the following articles:
* [Software Naming](https://technick.net/guides/software/software_naming)
* [Software Structure](https://technick.net/guides/software/software_structure)
* [Software Versioning](https://technick.net/guides/software/software_versioning)
* [Software Configuration](https://technick.net/guides/software/software_configuration)
* [Software Logging Format](https://technick.net/guides/software/software_logging_format)
* [Software Metrics](https://technick.net/guides/software/software_metrics)
* [Simple API JSON Response Format](https://technick.net/guides/software/software_json_api_format)
* [Software Automation](https://technick.net/guides/software/software_automation)
* [Build Software with Docker](https://technick.net/guides/software/software_docker_build)
Each generated project is immediately functional and can be fully tested using the ```make build``` command.
## Quick Start
This project includes a Makefile that allows you to test and build the project in a Linux-compatible system with simple commands.
All the artifacts and reports produced using this Makefile are stored in the *target* folder.
To see all available options:
```
make help
```
## Usage
```
make new TYPE=app CONFIG=myproject.cfg
```
* **TYPE** is the project type:
* **lib** : library
* **app** : command-line application
* **srv** : HTTP API service
* **libapp** : library + command-line application
* **libsrv** : library + HTTP API service
* **CONFIG** is the configuration file containing the project settings.
To create a new configuration please clone the *default.cfg* file and change the values.
All projects are creted inside the *target* directory.
## Features
### Services (srv)
* Web HTTP RESTful JSON API;
* Standard command line options;
* Multiple configuration options, including remote configuration via URL;
* Logging;
* StatsD client to collect usage metrics;
* Unit tests;
* Makefile;
* Docker build;
* Conda packaging.
* Wheel packaging.
### Applications (app)
* Standard command line options;
* Multiple configuration options, including remote configuration via URL;
* Logging;
* StatsD client to collect usage metrics;
* Unit tests;
* Makefile;
* Docker build;
* Conda packaging.
* Wheel packaging.
### Libraries (lib)
* Unit tests;
* Makefile;
* Docker build;
* Conda packaging.
* Wheel packaging.