Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/billy0402/python-package-template
A Python package template.
https://github.com/billy0402/python-package-template
package python template
Last synced: 2 days ago
JSON representation
A Python package template.
- Host: GitHub
- URL: https://github.com/billy0402/python-package-template
- Owner: billy0402
- License: mit
- Created: 2023-04-15T06:57:16.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2024-08-01T03:37:12.000Z (4 months ago)
- Last Synced: 2024-08-01T10:38:37.587Z (4 months ago)
- Topics: package, python, template
- Language: Python
- Homepage:
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# python-package-template
This is a simple example package. You can use
[GitHub-flavored Markdown](https://guides.github.com/features/mastering-markdown/)
to write your content.## Development environment
- [macOS 12.6.5](https://www.apple.com/tw/macos/monterey/)
- [Visual Studio Code 1.85.1](https://code.visualstudio.com/)
- [Python 3.11.7](https://www.python.org/)## Official tutorial
- [Tutorial](https://packaging.python.org/en/latest/tutorials/packaging-projects/)
## Export requirements.txt
```shell
$ pipenv requirements > requirements.txt$ pipenv requirements --dev > dev-requirements.txt
```## Build package
```shell
$ python -m build
```## Package require files
```
.
├── dev-requirements.txt
├── dist (build)
│ ├── python_package_template-0.0.1-py3-none-any.whl
│ └── python_package_template-0.0.1.tar.gz
├── pyproject.toml
├── requirements.txt
└── src
├── python_package_template
│ ├── __init__.py
│ ├── example.py
│ └── py.typed
└── python_package_template.egg-info (build)
├── PKG-INFO
├── SOURCES.txt
├── dependency_links.txt
└── top_level.txt
```## Generate type stub files
- [Guide](https://typing.readthedocs.io/en/latest/guides/writing_stubs.html)
```shell
$ cd src
$ stubgen -p python_package_template -o typings
```## Install package from other project
```shell
$ pip install git+https://github.com/billy0402/python-package-template.git$ pipenv install git+https://github.com/billy0402/python-package-template.git
$ poetry add git+https://github.com/billy0402/python-package-template.git
```