Skip to main content

Springlabs Projects Django Standard

Project description

SpringLabs-Django

N|Solid

Springlabs-Django is a CLI Application to manage Django projects with a defined structure to springlabs.

  • Create version
  • Create group
  • Create api
    • Model
    • Open
  • Create graph
    • Model
    • Open

Primero resuelve el problema, despues escribe el código. — John Johnson

Tech

Springlabs-Django uses a number of open source projects to work properly:

  • Django - high-level Python Web framework
  • DjangoRestFramework - powerful and flexible toolkit for building Web APIs.
  • Graphene-Django - provides some additional abstractions that make it easy to add GraphQL functionality to your Django project

Installation

Springlabs-Django requires Python v3.6+ to run.

Install and update using pip.

$ pip install -U springlabs-django

Install latest version

$ pip install springlabs-django

Install specific version

$ pip install springlabs-django==[version]

Usage

Helpers

After install the library Open your favorite Terminal and run these commands.

Help:

$ springlabs_django --help

Console output

Usage: springlabs_django [OPTIONS] COMMAND [ARGS]...

  Springlabs Django Manager.

Options:
  --version  Show the version and exit.
  --help     Show this message and exit.

Commands:
  create-api      Create a new api for django project
  create-graph    Create a new graph for django project
  create-group    Create a new group for django project
  create-version  Create a new version for django project

Version:

$ springlabs_django --version

Console output

Springlabs Django Manager, v[version]

Create Version Help:

$ springlabs_django create-version --help

Console output

Usage: springlabs_django create-version [OPTIONS]

  Create a new version for django project

Options:
  -ve, --version TEXT  New version for the application
  --help               Show this message and exit.

Create Group Help:

$ springlabs_django create-group --help

Console output

Usage: springlabs_django create-group [OPTIONS]

  Create a new group for django project

Options:
  -ve, --version [1]  Version to which the group will be added
  -gr, --group TEXT   New group for the application
  --help              Show this message and exit.

Create API Help:

$ springlabs_django create-api --help

Console output

Usage: springlabs_django create-api [OPTIONS]

  Create a new api for django project

Options:
  -ve, --version [1]              Version to use
  -g, --group [options]           Group to use
  -n, --name TEXT                 API name
  -http, --http_verb [POST|PUT|DELETE]
                                  HTTP verb to use in the api  [default: POST]
  -t, --type_api [model|open]     API type  [default: open]
  -u, --url TEXT                  API url
  -a, --availability [public|private]
                                  API availability  [default: public]
  --help                          Show this message and exit.

Create GraphQL Help:

$ springlabs_django create-graph --help

Console output

Usage: springlabs_django create-graph [OPTIONS]

  Create a new graph for django project

Options:
  -ve, --version [1]             Version to use
  -g, --group [options]          Group to use
  -n, --name TEXT                GraphQL name
  -t, --type_graph [model|open]  Graph type  [default: open]
  --help                         Show this message and exit

Create Version

Create version with interactive CLI

$ springlabs_django create-version

Console output

Insert the version number: 4
Version '4' was created successfully

Create version shortcut To create a version simple shortcut use the options --flag send the value after flag Example:

$ springlabs_django create-version --version 2

Console output

Version '2' was created successfully

Alternative use -flag instead of --flag send the value after flag Example:

$ springlabs_django create-version -ve 2

Console output

Version '2' was created successfully

Create Group

Create group with interactive CLI

$ springlabs_django create-group

Console output

Insert version (1, 2, 3, 4): 4
Insert group name: groupname
Group 'groupname' was created successfully

Create group shortcut To create a group simple shortcut use the options --flag send the value after flag Example:

$ springlabs_django create-group --version 4 --group groupname

Console output

Group 'groupname' was created successfully

Alternative use -flag instead of --flag send the value after flag Example:

$ springlabs_django create-group -ve 2 -gr groupname

Console output

Group 'groupname' was created successfully

Create API

Create API with interactive CLI

$ springlabs_django create-api

Console output

Insert version (1, 2, 3, 4): 4
Insert group (users, groupname): groupname
Insert api name: apiname
Insert http verb (POST, PUT, DELETE) [POST]: POST
Insert api type (model, open) [open]: open
Insert api url: apiname/parameter
Insert api availability (public, private) [public]: public
The api 'apiname' was created successfully

Create API shortcut To create a API simple shortcut use the options --flag send the value after flag Example:

$ springlabs_django create-api --version 4 --group groupname --name apiname --http_verb POST --type_api open --url apiname/parameter --availability public

Console output

The api 'apiname' was created successfully

Alternative use -flag instead of --flag send the value after flag Example:

$ springlabs_django create-api -ve 4 -g groupname -n apiname -http POST -t open -u apiname/parameter -a public

Console output

The api 'apiname' was created successfully

Create Graph

Create Graph with interactive CLI

$ springlabs_django create-graph

Console output

Insert version (1, 2, 3, 4): 4
Insert group (users, groupname): groupname
Insert graph name: graphname
Insert graph type (model, open) [open]: open
Graph 'graphname' was successfully created

Create Graph shortcut To create a Graph simple shortcut use the options --flag send the value after flag Example:

$ springlabs_django create-graph --version 4 --group groupname --name graphname --type_graph open

Console output

Graph 'graphname' was successfully created

Alternative use -flag instead of --flag send the value after flag Example:

$ springlabs_django create-graph -ve 4 -g groupname -n graphname -t open

Console output

Graph 'graphname' was successfully created

Commands

springlabs_python

Command Short Long
Help --help
Version --version

springlabs_python create-version

Command Short Long
Help --help
Version -ve --version

springlabs_python create-group

Command Short Long
Help --help
Version -ve --version
Group -gr --group

springlabs_python create-api

Command Short Long
Help --help
Version -ve --version
Group -g --group
Name -n --name
HTTP Verb -http --http_verb
Type API -t --type_api
URL -u --url
Availability -a --availability

springlabs_python create-graph

Command Short Long
Help --help
Version -ve --version
Group -g --group
Name -n --name
Type Graph -t --type_graph

Links

License

MIT

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

springlabs_django-0.3.5.tar.gz (21.1 kB view details)

Uploaded Source

Built Distributions

springlabs_django-0.3.5-py3.6.egg (36.9 kB view details)

Uploaded Source

springlabs_django-0.3.5-py3-none-any.whl (39.3 kB view details)

Uploaded Python 3

File details

Details for the file springlabs_django-0.3.5.tar.gz.

File metadata

  • Download URL: springlabs_django-0.3.5.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9

File hashes

Hashes for springlabs_django-0.3.5.tar.gz
Algorithm Hash digest
SHA256 4fa234717c691fec572f05fd7868112f31c06dcc09212e13c2a9094c6b7fd70e
MD5 47d0af916c408c1e03c466da14e93ece
BLAKE2b-256 ce84777aa4d29a19cce80f5c0d727b27beb4b1a5640c8403a3a3643210103a89

See more details on using hashes here.

File details

Details for the file springlabs_django-0.3.5-py3.6.egg.

File metadata

  • Download URL: springlabs_django-0.3.5-py3.6.egg
  • Upload date:
  • Size: 36.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9

File hashes

Hashes for springlabs_django-0.3.5-py3.6.egg
Algorithm Hash digest
SHA256 5144bb6f9daf9ab0bc62f7ced018e3dc1fa6888ce42e42583da6d8081bca56c8
MD5 3c07d92ccb97a70eebcb4bf6cfa7a28c
BLAKE2b-256 e414f5812316ad7d2d4d75044fb5d604cbb2ff0c5c2aa238d419873cba058835

See more details on using hashes here.

File details

Details for the file springlabs_django-0.3.5-py3-none-any.whl.

File metadata

  • Download URL: springlabs_django-0.3.5-py3-none-any.whl
  • Upload date:
  • Size: 39.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.6.9

File hashes

Hashes for springlabs_django-0.3.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d5a917e11c0cfdda4851a11bdb6e88b3d5676c6ac7f603b0c07c0ed83cb90656
MD5 4014399c0bd1fa497f1a0ef348997850
BLAKE2b-256 50fc45e531442ef0e2ae1aee33a989dc2c153736abb40ad698f25b01c8174d41

See more details on using hashes here.

Supported by

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