No project description provided
Project description
Guide
-
Require:
- Python >= 3.7
- Poetry >= 1.2.0
-
Prepare
- Install poetry
- Using poetry to create new source or init to existed source
-
Configure pyproject.toml
- Minimum requirements
[tool.poetry] name = "demopythonlib" -> project / package name version = "0.1.0" -> pypi only accept code with new version packages = [{include = "demopythonlib"}] -> is package should be packed then push to pypi ... [tool.poetry.dependencies] python = "^3.12" -> python version should fit with your project ... [tool.poetry.scripts] say-hi = "demopythonlib:say_hi" -> add custom command to run directly from terminal -> like "celery -A worker ...." ...
-
Prepare your pypi account
- Create new if you need: https://pypi.org/account/register/
- Add 2FA to your account
- Login > Account Settings > Tokens
- Add API Token: create a token for all projects (for first time publish) - copy it and securely storage
-
Publish first time
- Build
$ poetry build -> Building demopythonlib (0.1.0) - Building sdist - Built demopythonlib-0.1.0.tar.gz - Building wheel - Built demopythonlib-0.1.0-py3-none-any.whl
- Add credential
$ poetry config pypi-token.pypi <your-token>
- Publish
$ poetry publish
- Build
-
Add Api token to next deploy code
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
demopythonlib-0.1.0.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for demopythonlib-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e93727873b4bdd5a92ea714475948975919a4a51028497a9ba1db7c92e178301 |
|
MD5 | 8a9dddd1eb1021ac84650ecb0a9f104b |
|
BLAKE2b-256 | a40ab1c5f8cbc2a34ba0677181437e0043f2c5a0a5a9f440d6425d9d2ab85dc9 |