A package to provide you Chocochip cookies
Project description
Chocochip
This is my first repository that will be published to PyPI
Goal 1: Publishing to PyPI
Creating project structure
- Clone the Github repository locally.
- Create a subfolder with the same name as the package. We will refer this as primary subfolder.
- Create a file named init.py inside the primary subfolder
- Inside the primary subfolder create a python file with the same name as the package name.
- Create a file named requirements_dev.txt
Adding requirements
- First of all identify the latest versions of pip and wheel and add them to the requirements_dev.txt
- Now install it using
pip install -r requirements_dev.txt
Adding first function
- Now add code to your main python file. In my case its
chocochip.py - Here is my code snippet
def give_me_a_cookie(name: str):
"""This function gives a cookie to the person who calls it
Args:
name (str): Name of the person
Returns:
str: Name of the person
"""
print(f'Hi {name}! Here is your cookie again and again')
return name
Add setup.py file
Here is my template
from setuptools import setup, find_packages
with open("README.md", "r") as readme_file:
readme = readme_file.read()
setup(
name="chocochip",
version="0.0.1",
author="Vignesh Baskaran",
author_email="vignesh.sbaskaran@gmail.com",
description="A package to provide you Chocochip cookies",
long_description=readme,
long_description_content_type="text/markdown",
url="https://github.com/VigneshBaskar/chocochip",
packages=find_packages(),
classifiers=[
"Programming Language :: Python :: 3.7",
"License :: OSI Approved :: GNU General Public License v3 (GPLv3)",
],
)
Install twine
- Find the latest version of twine on PyPI
- Add it to the requirements_dev.txt and install it using
pip install -r requirements_dev.txt
Commiting and Pushing the code to Github
- Add and commit the modified files until now. In my case they are:
- README.md
- requirements_dev.txt
- chocochip/init.py
- chocochip/chocochip.py
- setup.py
- Push the files to remote branch
References:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
chocochip-0.0.1.tar.gz
(2.1 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
chocochip-0.0.1-py3-none-any.whl
(14.9 kB
view details)
File details
Details for the file chocochip-0.0.1.tar.gz.
File metadata
- Download URL: chocochip-0.0.1.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0c99c63f45784a8722b930ce153fb9a12fd2ee85de03484649ca2f64eacbe36
|
|
| MD5 |
6b8fa61b582cebf204038ef102eb0e16
|
|
| BLAKE2b-256 |
0a545a6ce7eedbd6e0ba93829d27f22015400ec05f017bf672c2687bb570d256
|
File details
Details for the file chocochip-0.0.1-py3-none-any.whl.
File metadata
- Download URL: chocochip-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.7.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69ff484ee00d63607a7c761a48901a3e8dd8993a85b2aee0b8ca5ac98cee609d
|
|
| MD5 |
c124bdf01bdff4f3d74cb3b456dc188b
|
|
| BLAKE2b-256 |
3465132abe8313aad1619dbfe15cfa63552919c1d8c26cb570b417b9ebf928d8
|