René's URL Explorer Experiment


Title: Create a pure Python package — Python Packaging Guide

Open Graph Title: Create a pure Python package

Description: This diagram has two smaller boxes with arrows pointing to the right to a Python environment. The small boxes read your-package and pip install package. The environment box on the right reads - you...

Open Graph Description: This diagram has two smaller boxes with arrows pointing to the right to a Python environment. The small boxes read your-package and pip install package. The environment box on the right reads - you...

Opengraph URL: https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html

direct link

Domain: www.pyopensci.org

og:typewebsite
og:site_namepyOpenSci Python Package Guide
og:image:width1146
og:image:height600
og:imagehttps://www.pyopensci.org/python-package-guide/_images/social_previews/summary_tutorials_create-python-package_4053832c.png
og:image:altThis diagram has two smaller boxes with arrows pointing to the right to a Python environment. The small boxes read your-package and pip install package. The environment box on the right reads - you...
twitter:cardsummary_large_image
docsearch:languageen

Links:

Skip to main contenthttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#main-content
We run peer review of scientific Python software. Learn more.https://www.pyopensci.org/about-peer-review/index.html
https://www.pyopensci.org/python-package-guide/index.html
Tutorials https://www.pyopensci.org/python-package-guide/tutorials/intro.html
Packaging https://www.pyopensci.org/python-package-guide/package-structure-code/intro.html
Documentation https://www.pyopensci.org/python-package-guide/documentation/index.html
Tests https://www.pyopensci.org/python-package-guide/tests/index.html
Maintain https://www.pyopensci.org/python-package-guide/maintain-automate/index.html
pyOpenSci Website https://www.pyopensci.org
Peer Review Guide https://www.pyopensci.org/software-peer-review
Handbook https://pyopensci.org/handbook
GitHubhttps://github.com/pyopensci/python-package-guide
Mastodonhttps://fosstodon.org/@pyOpenSci
Tutorials https://www.pyopensci.org/python-package-guide/tutorials/intro.html
Packaging https://www.pyopensci.org/python-package-guide/package-structure-code/intro.html
Documentation https://www.pyopensci.org/python-package-guide/documentation/index.html
Tests https://www.pyopensci.org/python-package-guide/tests/index.html
Maintain https://www.pyopensci.org/python-package-guide/maintain-automate/index.html
pyOpenSci Website https://www.pyopensci.org
Peer Review Guide https://www.pyopensci.org/software-peer-review
Handbook https://pyopensci.org/handbook
GitHubhttps://github.com/pyopensci/python-package-guide
Mastodonhttps://fosstodon.org/@pyOpenSci
Get to know Hatchhttps://www.pyopensci.org/python-package-guide/tutorials/get-to-know-hatch.html
What is a Python package?https://www.pyopensci.org/python-package-guide/tutorials/intro.html
Create a Python packagehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html
Publish to PyPIhttps://www.pyopensci.org/python-package-guide/tutorials/publish-pypi.html
Publish to conda-forgehttps://www.pyopensci.org/python-package-guide/tutorials/publish-conda-forge.html
Publish using GitHub Actions and Trusted Publishinghttps://www.pyopensci.org/python-package-guide/tutorials/trusted-publishing.html
Develop package (Hatch environments)https://www.pyopensci.org/python-package-guide/tutorials/develop-python-package-hatch.html
Add README filehttps://www.pyopensci.org/python-package-guide/tutorials/add-readme.html
Add a license & code of conducthttps://www.pyopensci.org/python-package-guide/tutorials/add-license-coc.html
Update metadata in pyproject.tomlhttps://www.pyopensci.org/python-package-guide/tutorials/pyproject-toml.html
Command Line Reference Guidehttps://www.pyopensci.org/python-package-guide/tutorials/command-line-reference.html
Migrate setup.py to a pyproject.toml using Hatchhttps://www.pyopensci.org/python-package-guide/tutorials/setup-py-to-pyproject-toml.html
https://www.pyopensci.org/python-package-guide/index.html
Python packaging 101https://www.pyopensci.org/python-package-guide/tutorials/intro.html
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#create-a-pure-python-package
build backendhttps://www.pyopensci.org/python-package-guide/package-structure-code/python-package-build-tools.html#build-backends
buildhttps://www.pyopensci.org/python-package-guide/package-structure-code/python-package-distribution-files-sdist-wheel.html#build-package
Copierhttps://copier.readthedocs.io/en/stable/
Hatch installedhttps://www.pyopensci.org/python-package-guide/tutorials/get-to-know-hatch.html
[1]https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#shell-lesson
gitbashhttps://gitforwindows.org/
https://www.pyopensci.org/python-package-guide/_images/environment-package-install.png
previous lesson, you learned what a Python package ishttps://www.pyopensci.org/python-package-guide/tutorials/intro.html
Scroll to the bottom of the page to learn more about the basic elements of a Python package.https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#package-overview
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#packages-environment
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#create-your-python-package
pyOpenSci copier templatehttps://github.com/pyOpenSci/pyos-package-template
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-1-set-up-the-package-directory-structure
Sphinxhttps://www.pyopensci.org/python-package-guide/documentation/hosting-tools/sphinx-python-package-documentation-tools.html
mkdocshttps://www.mkdocs.org/
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-2-explore-the-existing-module-in-your-package
numpy-style docstringhttps://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/document-your-code-api-docstrings.html#numpy-docstring
typinghttps://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/document-your-code-api-docstrings.html#type-hints
[2]https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#numpydoc
[3]https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#googledoc
[4]https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#epytextdoc
Learn more about docstrings herehttps://www.pyopensci.org/python-package-guide/documentation/write-user-documentation/document-your-code-api-docstrings.html#api-docstrings
[5]https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#python-modules
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-3-optional-add-code-to-your-module
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-4-check-out-the-metadata-in-your-pyproject-toml-file
next lesson when you add additional metadata/information to this file.https://www.pyopensci.org/python-package-guide/tutorials/pyproject-toml.html
The TOML formathttps://toml.io/en/
hatchlinghttps://pypi.org/project/hatchling/
Learn more about the pyproject.toml format here.https://www.pyopensci.org/python-package-guide/package-structure-code/pyproject-toml-python-package-metadata.html#pyprojecttoml-metadata
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-5-install-your-package-locally
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#look-for-pyospackage-in-your-environment
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-6-test-out-your-new-package
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#congratulations-you-created-your-first-python-package
README filehttps://www.pyopensci.org/python-package-guide/tutorials/add-readme.html
LICENSEhttps://www.pyopensci.org/python-package-guide/tutorials/add-license-coc.html
Add more metadata to your pyproject.tomlhttps://www.pyopensci.org/python-package-guide/tutorials/pyproject-toml.html
Learn how to build your package distributionhttps://www.pyopensci.org/python-package-guide/tutorials/publish-pypi.html
publish to conda-forgehttps://www.pyopensci.org/python-package-guide/tutorials/publish-conda-forge.html
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#about-the-python-package-directory-structure
https://www.pyopensci.org/python-package-guide/_images/code-to-python-package.png
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#code-to-python-package
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#about-the-basic-package-directory-structure
ensures that you are running tests on the installed version of your codehttps://www.pyopensci.org/python-package-guide/package-structure-code/python-package-structure.html#the-src-layout-and-testing
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#what-is-an-init-py-file
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#what-is-a-pyproject-toml-file
build your packagehttps://www.pyopensci.org/python-package-guide/package-structure-code/python-package-distribution-files-sdist-wheel.html
Using Hatch to Migrate setup.py to a pyproject.tomlhttps://www.pyopensci.org/python-package-guide/tutorials/setup-py-to-pyproject-toml.html
#https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#footnotes
1https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#id1
Carpentries shell lessonhttps://swcarpentry.github.io/shell-novice/
2https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#id2
Numpy style docshttps://numpydoc.readthedocs.io/en/latest/format.html
3https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#id3
Google docstring stylehttps://google.github.io/styleguide/pyguide.html
4https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#id4
epydochttps://epydoc.sourceforge.net/epytext.html
5https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#id5
Python module docshttps://docs.python.org/3/tutorial/modules.html#packages
previous Get to Know Hatch https://www.pyopensci.org/python-package-guide/tutorials/get-to-know-hatch.html
next Publish your Python package to PyPI https://www.pyopensci.org/python-package-guide/tutorials/publish-pypi.html
Create your Python packagehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#create-your-python-package
Step 1: Set Up the Package Directory Structurehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-1-set-up-the-package-directory-structure
Step 2: Explore the existing module in your packagehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-2-explore-the-existing-module-in-your-package
Step 3: Optional – Add code to your modulehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-3-optional-add-code-to-your-module
Step 4: Check out the metadata in your pyproject.toml filehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-4-check-out-the-metadata-in-your-pyproject-toml-file
Step 5: Install your package locallyhttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-5-install-your-package-locally
Look for pyospackage in your environmenthttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#look-for-pyospackage-in-your-environment
Step 6: Test out your new packagehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#step-6-test-out-your-new-package
Congratulations! You created your first Python packagehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#congratulations-you-created-your-first-python-package
About the Python package directory structurehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#about-the-python-package-directory-structure
About the basic package directory structurehttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#about-the-basic-package-directory-structure
What is an __init__.py file?https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#what-is-an-init-py-file
What is a pyproject.toml file?https://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#what-is-a-pyproject-toml-file
Footnoteshttps://www.pyopensci.org/python-package-guide/tutorials/create-python-package.html#footnotes
Edit on GitHub https://github.com/pyopensci/python-package-guide/edit/main/tutorials/create-python-package.md
Show Sourcehttps://www.pyopensci.org/python-package-guide/_sources/tutorials/create-python-package.md.txt
Code of Conducthttps://www.pyopensci.org/handbook/CODE_OF_CONDUCT.html

Viewport: width=device-width, initial-scale=1


URLs of crawlers that visited me.