https://github.com/definetlynotai/python_library_template
https://github.com/definetlynotai/python_library_template
cheatsheet create guide library new python upload
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/definetlynotai/python_library_template
- Owner: DefinetlyNotAI
- Created: 2024-05-17T10:23:36.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-07-07T10:40:41.000Z (over 1 year ago)
- Last Synced: 2024-09-19T00:57:59.935Z (over 1 year ago)
- Topics: cheatsheet, create, guide, library, new, python, upload
- Language: Python
- Homepage:
- Size: 15.6 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Guide to Upload PyPI libraries
## Setup
Use the 2 python files attached and modify for your needs,
For `__init__.py`, Replace `LIBRARY_NAME` from the line's `from.LIBRARY_NAME import *` for any extra files you have that include classes, so if I have a file called `Algorithims.py`, I add the following line: `from.Algorithims import *`.
For `setup.py`, Replace anything with `CHANGE_ME` in it, This includes name, version, description, author, author email, classifiers and anything with comments, The higher quality the `setup.py` file is, the better your library becomes.
## Launch
After everything, Open cmd inside the directory of the library
`python setup.py sdist bdist_wheel`
`twine upload dist/* --verbose`
Use the API key from your PyPI account if asked.
(Do note you need to install twine via `pip install twine`)