# [Python Sample App](https://github.com/becosta/python-sample-app)
[Python Sample App](https://github.com/becosta/python-sample-app) is a starter template for new python applications.
You can clone it, edit some basic stuff and get started on your new app.
## Application layout
Your new application layout is as following:
```
python-sample-app
├── apidoc/
| └── .gitkeep
├── doc/
| └── .gitkeep
├── python_sample_app/
| ├── test/
| | └── __init__.py
| ├── __init__.py
| └── main.py
├── scripts/
| └── .gitkeep
├── .gitignore
├── LICENSE.md
├── README.md
└── setup.py
```
## Editing to match your project needs
First clone or download this repository:
```sh
$ git clone https://github.com/becosta/python-sample-app.git
```
First thing to do is to rename the project directory (python-sample-app) to your project's name.
```sh
$ mv python-sample-app ${your_project_name} && cd ${your_project_name}
```
Then you can move on to renaming the main package directory (python_sample_app).
```sh
$ mv python_sample_app ${your_main_package_name}
```
After this you need to edit setup.py: ```$ editor setup.py```
```python
name='<your_project>',
version='<your_project_version>',
description='<your_project_description>',
author='<your_name>',
author_email='<you@example.com>',
license="<your_project_license>",
url="<your_project_url>",
packages=['<your_project_main_package>'],
entry_points={
'console_scripts': [
'<your_command>=<your_project_main_package>.main:main',
],
},
```
Note that ```<your_command>``` is the name of the entry script that will be generated by ```$ pip install -e .```. In other words this is the name of the command you'll use to call your application from the console later on. Also, note that you can have more than one entry point [see the setuptools documentation](https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins) for more information.
Once done, edit ```LICENSE.md```, ```README.md``` and ```.gitignore``` according to your needs. If you don't need any of the ```apidoc```, ```doc``` and ```scripts``` directories you should remove them now.
[Python Sample App](https://github.com/becosta/python-sample-app) is a starter template for new python applications.
You can clone it, edit some basic stuff and get started on your new app.
## Application layout
Your new application layout is as following:
```
python-sample-app
├── apidoc/
| └── .gitkeep
├── doc/
| └── .gitkeep
├── python_sample_app/
| ├── test/
| | └── __init__.py
| ├── __init__.py
| └── main.py
├── scripts/
| └── .gitkeep
├── .gitignore
├── LICENSE.md
├── README.md
└── setup.py
```
## Editing to match your project needs
First clone or download this repository:
```sh
$ git clone https://github.com/becosta/python-sample-app.git
```
First thing to do is to rename the project directory (python-sample-app) to your project's name.
```sh
$ mv python-sample-app ${your_project_name} && cd ${your_project_name}
```
Then you can move on to renaming the main package directory (python_sample_app).
```sh
$ mv python_sample_app ${your_main_package_name}
```
After this you need to edit setup.py: ```$ editor setup.py```
```python
name='<your_project>',
version='<your_project_version>',
description='<your_project_description>',
author='<your_name>',
author_email='<you@example.com>',
license="<your_project_license>",
url="<your_project_url>",
packages=['<your_project_main_package>'],
entry_points={
'console_scripts': [
'<your_command>=<your_project_main_package>.main:main',
],
},
```
Note that ```<your_command>``` is the name of the entry script that will be generated by ```$ pip install -e .```. In other words this is the name of the command you'll use to call your application from the console later on. Also, note that you can have more than one entry point [see the setuptools documentation](https://setuptools.readthedocs.io/en/latest/setuptools.html#dynamic-discovery-of-services-and-plugins) for more information.
Once done, edit ```LICENSE.md```, ```README.md``` and ```.gitignore``` according to your needs. If you don't need any of the ```apidoc```, ```doc``` and ```scripts``` directories you should remove them now.
Release files for python-sample-app 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| python-sample-app-1.0-post1.tar.gz | 2.0 kB | Details |
Release files / python-sample-app-1.0-post1.tar.gz
| Download URL | python-sample-app-1.0-post1.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d09c281d6e88c678b0caa37619356013fecafadfacd263906dd143ae407797ff
|
|
BLAKE2b-256 checksum How to use checksums |
84a9b1ca0f3a64c3ec88e4e090e1db92aaee3b2f1581fcb1c441ffdc8459185d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |