Developer advocate / Data Scientist - support open-source and building the community.
Python Zero to Heros
Online Absolute Beginner Python Tutorials
Every Sunday 2pm (UK time/ BST)
Get this slide deck:
Python objects, Control flows,
Functions, modeuls, classes and decorators
strings operations and regex with re
pytest with fixtures and mock
python linters & auto-formatters
Iterators, generators, async
There are some tasks in Python that are specific for a common application.
e.g. scrapping webpages, scitific calculations, testing codes, deal with timezones and datatimes.
The standard library cannot cover everyone's need.
We want to share the code that we have writen for those specific tasks for people doing the same tasks
We need a way to share those codes easily.
So we wrap up those codes as a package and upload it to The Python Package Index (PyPI) for others to download and install. (pip install)
⚠️ Everyone can upload to PyPI so make sure you know the package before pip install and make sure you type the name correctly
Python Packaging Authority
The Python Packaging Authority (PyPA) is a working group that maintains a core set of software projects used in Python packaging.
Let's start simple
│ └── __init__.py
Check the test tutorials
import setuptools with open("README.md", "r") as fh: long_description = fh.read() setuptools.setup( name="example-pkg-YOUR-USERNAME-HERE", # Replace with your own username version="0.0.1", author="Example Author", author_email="firstname.lastname@example.org", description="A small example package", long_description=long_description, long_description_content_type="text/markdown", url="https://github.com/pypa/sampleproject", packages=setuptools.find_packages(), classifiers=[ "Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", ], python_requires='>=3.6', )
Let's look at a real example
Let's try following the tutorial and upload to test PyPI
Sunday 2pm (UK time/ BST)
There are also Mid Meet Py every Wednesday 1pm
By Cheuk Ting Ho