PyBuilder Archetype API Plugin
This plugin generates a structure for a project that requieres endpoints (APIs or web services). This plugin needs
pybuilder_archetype_base due to its dependancy with one of its
tasks (create_archetype_api).
In the following diagram there is every directory and file created during create_archetype_api execution (take note
that create_archetype_base task will add more packages and directories -check its README.md file for more
information):
src
└── package_name
├── api # For every script related with the web services
| ├── __init__.py
| └── api_example.py
├── config
| ├── __init__.py
| └── constants.py
├── __init__.py
├── gunicorn_config.py # Gunicorn launching configuration
├── main.py # Script with Flask app
└── wsgi.py # WSGI file for server launch
requirements.txt
Content from requirements.txt and constants.py files will be added to the currently existing ones, trying to keep
the values set by other plugins.
How to use pybuilder_archetype_api
NOTICE: This plugin only works on Windows due to its dependency with pybuilder_archetype_base PyBuilder plugin. Using this plugin in other OS shall not work properly. Multi-platform support soon.
Add plugin dependencies to your build.py (it requires pybuilder_archetype_base and pybuilder_pycharm_workspace
to work properly):
use_plugin('pypi:pybuilder_pycharm_workspace')
use_plugin('pypi:pybuilder_archetype_base')
use_plugin('pypi:pybuilder_archetype_api')
Configure the plugin within your init function:
@init
def initialise(project):
project.set_property('project_base_path', project_path)
This will tell the plugin which is the project location in the filesystem. project_base_path property value should
be always the same.
Launch the task with:
(venv) C:\Users\foo\PycharmProjects\bar> pyb create_archetype_api
build.py file recommended
Check pybuilder_archetype_base build.py recommendation.
Properties
Plugin has next properties with provided defaults
| Name | Type | Default Value | Description |
|---|---|---|---|
| project_base_path | Path | None | Project's path in filesystem (same as build.py file). Mandatory |
Release files for pybuilder-archetype-api 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pybuilder-archetype-api-0.1.1.tar.gz | 5.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pybuilder_archetype_api-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.6 kB
Release files / pybuilder-archetype-api-0.1.1.tar.gz
| Download URL | pybuilder-archetype-api-0.1.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1e7efb4f390e5277d2bb7cd1ceaa64b1bfb454fc1413a7969abdc51c8b8aab7
|
|
BLAKE2b-256 checksum How to use checksums |
c200f39595e569b89786f0f28cf520a666788ea7762d09d1a202952c30279840
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|
Release files / pybuilder_archetype_api-0.1.1-py3-none-any.whl
| Download URL | pybuilder_archetype_api-0.1.1-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1d82aa3dfdd53d4212629131d5a69a15ef94869d5b5026837e9526f5ff7d5bdc
|
|
BLAKE2b-256 checksum How to use checksums |
3d3ccbeea6ac27ddb455a01469b503ea832b26ba4a047d746781a291e1948998
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.3
|