# Quick-PyPI
The simplest and quickest way to build and publish a PyPI package
## Installation
```pip
pip install quick-pypi
```
## Minimum Example
Before you start, you need to have several things:
- Determine a unique PyPI package name, easy to remember, like 'quick-pypi-test';
- Have a PyPI account, then export your upload token to a txt file in your computer;
- Use PyCharm IDE or VSCode to develop your own package. We support Jupyter Notebook now!
Step 1: Prepare your project tree like:
```
Project Root
-- src
-- your_package_name
-- __init__.py
-- your_class.py # where you can write your own code!
-- dists # auto generated folder storing uploading version history
-- 0.0.1
-- 0.0.2
-- ...
-- VERSION # a file storing the latest version of uploading
quick_pypi.py # Main settings of uploading package
```
Step 2: The simplest `quick_pypi.py` file content is below:
```python
from quick_pypi.deploy import *
auto_deploy(
cwd=os.path.dirname(os.path.realpath(__file__)), # When using jupyter notebook, using `cwd=os.getcwd()`
name="quick-pypi-test",
description="This is a quick-pypi-test package!",
pypi_token='../../pypi_upload_token.txt', # the token string or path from your PyPI account
)
```
Step 3: Deploy the package to PyPI server
After you finish writing your codes in the `src` package, you can just simply right-click the `quick-pypi.py` to run, and wait for its completion.
Step 4: Check if the package is uploaded successfully!
## Complicated Example settings for advanced users
A real example is here:
```python
from quick_pypi.deploy import *
# or you can use: `from quick_pypi.deploy_toml import *`
auto_deploy(
cwd=os.path.dirname(os.path.realpath(__file__)),
name="pyrefworks",
long_name="A Python Toolkit for RefWorks Data Analysis",
description="Converting RefWorks files into a CSV table file",
long_description="This is a project to convert RefWork files to a CSV file",
src_root="src",
dists_root=f"dists",
pypi_token='../pypi_upload_token.txt', # a file storing the token from your PyPI account
test=False, # determine if uploading to test.pypi.org
version="0.0.1a0", # fixed version when uploading or using version='auto'
project_url="http://github.com/dhchenx/pyrefworks",
author_name="Donghua Chen",
author_email="xxx@xxx.com",
requires="quick-csv",
license='MIT',
license_filename='LICENSE',
keywords="refworks, csv file",
github_username="dhchenx",
max_number_micro=20, # major.minor.micro
max_number_minor=20, # version maximum numbers in each part, e.g. 0.0.20 --> 0.1.0; 0.20.20 --> 1.0.0
# only_build=True
)
```
Here you can provide more information about your package, like setting your author's name, email, license, short or long names and descriptions, etc.
### Deploy to local computer without upload
```python
import quick_pypi as qp
qp.deploy(
src_root="src",
dist_root='data/dist1',
# name="quick-pypi-test",
# description="This is a quick-pypi project",
version="0.0.1a0", # fixed version number, wont change
# project_url="http://github.com/dhchenx/quick-pypi-test",
# author_name="Donghua Chen",
# author_email="douglaschan@126.com",
# requires="jieba;quick-crawler",
# license='MIT',
# license_filename='LICENSE'
)
```
This will generate a series of actual package files (e.g. README.md, LICENSE,setup.py, etc. ).
Then, you can manually build the package through twine in the directory of `dist1`.
An example using our toolkit to deploy in the PyPI platform is demonstrated [here](https://pypi.org/project/pyrefworks/).
## License
The `quick-pypi` project is provided by [Donghua Chen](https://github.com/dhchenx).
Raw data
{
"_id": null,
"home_page": "https://github.com/dhchenx/quick-pypi",
"name": "quick-pypi",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6, <4",
"maintainer_email": "",
"keywords": "python package deployment,python library",
"author": "Donghua Chen",
"author_email": "douglaschan@126.com",
"download_url": "https://files.pythonhosted.org/packages/8d/e4/dd563026d0534c47494c1242aeeebc1ea53692bb52c545a87d2935fefbfb/quick-pypi-0.0.4.tar.gz",
"platform": null,
"description": "# Quick-PyPI\r\n\r\nThe simplest and quickest way to build and publish a PyPI package\r\n\r\n## Installation\r\n```pip\r\npip install quick-pypi\r\n```\r\n\r\n## Minimum Example\r\n\r\nBefore you start, you need to have several things:\r\n- Determine a unique PyPI package name, easy to remember, like 'quick-pypi-test';\r\n- Have a PyPI account, then export your upload token to a txt file in your computer;\r\n- Use PyCharm IDE or VSCode to develop your own package. We support Jupyter Notebook now!\r\n\r\nStep 1: Prepare your project tree like:\r\n```\r\nProject Root\r\n -- src\r\n -- your_package_name\r\n -- __init__.py\r\n -- your_class.py # where you can write your own code!\r\n -- dists # auto generated folder storing uploading version history\r\n -- 0.0.1\r\n -- 0.0.2\r\n -- ...\r\n -- VERSION # a file storing the latest version of uploading\r\n quick_pypi.py # Main settings of uploading package\r\n```\r\n\r\nStep 2: The simplest `quick_pypi.py` file content is below: \r\n```python\r\nfrom quick_pypi.deploy import *\r\nauto_deploy(\r\n cwd=os.path.dirname(os.path.realpath(__file__)), # When using jupyter notebook, using `cwd=os.getcwd()`\r\n name=\"quick-pypi-test\",\r\n description=\"This is a quick-pypi-test package!\",\r\n pypi_token='../../pypi_upload_token.txt', # the token string or path from your PyPI account\r\n)\r\n```\r\n\r\nStep 3: Deploy the package to PyPI server\r\n\r\nAfter you finish writing your codes in the `src` package, you can just simply right-click the `quick-pypi.py` to run, and wait for its completion.\r\n\r\nStep 4: Check if the package is uploaded successfully!\r\n\r\n## Complicated Example settings for advanced users\r\n\r\nA real example is here:\r\n\r\n```python\r\nfrom quick_pypi.deploy import *\r\n# or you can use: `from quick_pypi.deploy_toml import *`\r\n\r\nauto_deploy(\r\n cwd=os.path.dirname(os.path.realpath(__file__)),\r\n name=\"pyrefworks\",\r\n long_name=\"A Python Toolkit for RefWorks Data Analysis\",\r\n description=\"Converting RefWorks files into a CSV table file\",\r\n long_description=\"This is a project to convert RefWork files to a CSV file\",\r\n src_root=\"src\",\r\n dists_root=f\"dists\",\r\n pypi_token='../pypi_upload_token.txt', # a file storing the token from your PyPI account\r\n test=False, # determine if uploading to test.pypi.org\r\n version=\"0.0.1a0\", # fixed version when uploading or using version='auto'\r\n project_url=\"http://github.com/dhchenx/pyrefworks\",\r\n author_name=\"Donghua Chen\",\r\n author_email=\"xxx@xxx.com\",\r\n requires=\"quick-csv\",\r\n license='MIT',\r\n license_filename='LICENSE',\r\n keywords=\"refworks, csv file\",\r\n github_username=\"dhchenx\",\r\n max_number_micro=20, # major.minor.micro\r\n max_number_minor=20, # version maximum numbers in each part, e.g. 0.0.20 --> 0.1.0; 0.20.20 --> 1.0.0\r\n # only_build=True\r\n)\r\n```\r\nHere you can provide more information about your package, like setting your author's name, email, license, short or long names and descriptions, etc. \r\n\r\n### Deploy to local computer without upload\r\n\r\n```python\r\nimport quick_pypi as qp\r\n\r\nqp.deploy(\r\n src_root=\"src\",\r\n dist_root='data/dist1',\r\n # name=\"quick-pypi-test\",\r\n # description=\"This is a quick-pypi project\",\r\n version=\"0.0.1a0\", # fixed version number, wont change\r\n # project_url=\"http://github.com/dhchenx/quick-pypi-test\",\r\n # author_name=\"Donghua Chen\",\r\n # author_email=\"douglaschan@126.com\",\r\n # requires=\"jieba;quick-crawler\",\r\n # license='MIT',\r\n # license_filename='LICENSE'\r\n\r\n)\r\n```\r\nThis will generate a series of actual package files (e.g. README.md, LICENSE,setup.py, etc. ).\r\n\r\nThen, you can manually build the package through twine in the directory of `dist1`. \r\n\r\nAn example using our toolkit to deploy in the PyPI platform is demonstrated [here](https://pypi.org/project/pyrefworks/).\r\n\r\n## License\r\nThe `quick-pypi` project is provided by [Donghua Chen](https://github.com/dhchenx). \r\n\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "The simplest and quickest way to build and publish a PyPI package",
"version": "0.0.4",
"project_urls": {
"Bug Reports": "https://github.com/dhchenx/quick-pypi/issues",
"Homepage": "https://github.com/dhchenx/quick-pypi",
"Source": "https://github.com/dhchenx/quick-pypi"
},
"split_keywords": [
"python package deployment",
"python library"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "da3ca051b745caecfa92403393726e7b2b3f909536ce39b741bb9fe21c1cf4d5",
"md5": "495b8cee4584f1baee1ff909b801371a",
"sha256": "fdbb261ea3d4b9f6dc5806a177c32e536f952db796c97f458ecdfb72ea150132"
},
"downloads": -1,
"filename": "quick_pypi-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "495b8cee4584f1baee1ff909b801371a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6, <4",
"size": 32934,
"upload_time": "2023-05-25T01:54:46",
"upload_time_iso_8601": "2023-05-25T01:54:46.594989Z",
"url": "https://files.pythonhosted.org/packages/da/3c/a051b745caecfa92403393726e7b2b3f909536ce39b741bb9fe21c1cf4d5/quick_pypi-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8de4dd563026d0534c47494c1242aeeebc1ea53692bb52c545a87d2935fefbfb",
"md5": "f036c02ce5e354aecf88718ce15bd6ef",
"sha256": "2e566ea2fe51d46fc56894f4ee3e0f713e107ecd07a3063300d8af4f4f65178e"
},
"downloads": -1,
"filename": "quick-pypi-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "f036c02ce5e354aecf88718ce15bd6ef",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6, <4",
"size": 20289,
"upload_time": "2023-05-25T01:54:48",
"upload_time_iso_8601": "2023-05-25T01:54:48.200148Z",
"url": "https://files.pythonhosted.org/packages/8d/e4/dd563026d0534c47494c1242aeeebc1ea53692bb52c545a87d2935fefbfb/quick-pypi-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-05-25 01:54:48",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dhchenx",
"github_project": "quick-pypi",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "quick-pypi"
}