Video description
In Video Editions the narrator reads the book while the content, figures, code listings, diagrams, and text appear on the screen. Like an audiobook that you can also watch as a video.
Create masterful, maintainable Python packages! This book includes pro tips for design, automation, testing, deployment, and even release as an open source project!
In Publishing Python Packages you will learn how to:
- Build extensions and console script commands
- Use tox to automate packaging, installing, and testing
- Build a continuous integration pipeline using GitHub Actions
- Improve code quality and reduce manual review using black, mypy, and flake8
- Create published documentation for your packages
- Keep packages up to date with pyupgrade and Dependabot
- Foster an open source community using GitHub features
Publishing Python Packages teaches you how to easily share your Python code with your team and the outside world. Learn a repeatable and highly automated process for package maintenance that’s based on the best practices, tools, and standards of Python packaging. This book walks you through creating a complete package, including a C extension, and guides you all the way to publishing on the Python Package Index. Whether you’re entirely new to Python packaging or looking for optimal ways to maintain and scale your packages, this fast-paced and engaging guide is for you.
About the Technology
Successful Python packages install easily, run flawlessly, and stay reliably up to date. Publishing perfect Python packages requires a rigorous process that supports systematic testing and review, along with excellent documentation. Fortunately, the Python ecosystem includes tools and techniques to automate package creation and publishing.
About the Book
Publishing Python Packages presents a practical process for sharing Python code in an automated and scalable way. Get hands-on experience with the latest packaging tools, and learn the ins and outs of package testing and continuous integration. You’ll even get pro tips for setting up a maintainable open source project, including licensing, documentation, and nurturing a community of contributors.
What's Inside
- Build extensions and console script commands
- Improve code quality with automated review and testing
- Create excellent documentation
- Keep packages up to date with pyupgrade and Dependabot
About the Reader
For intermediate Python programmers.
About the Author
Dane Hillard has spent the majority of his development career using Python to build web applications.
Quotes
...practical...I learned a lot from this book. A wholly modern approach to current packaging tooling and the problems faced by package developers…I think you’ll find it to be a useful source and an inspiration.
- From the Foreword by David Beazley, author of Python Distilled
A comprehensive guide to the Python packaging landscape. Dane takes a complicated topic and makes you think, ‘Yeah, I got this.’ It’s impressively done. Recommended.
- Carlton Gibson, Django Project
A comprehensive guide for Python programmers ready to share their code with the world.
- Joshua A. McAdams, Senior Software Engineer, Google
Table of contents
- Part 1. Foundations
- Chapter 1. The what and why of Python packages
- Chapter 1. How packaging helps you
- Chapter 1. Summary
- Chapter 2. Preparing for package development
- Chapter 2. Summary
- Chapter 3. The anatomy of a minimal Python package
- Chapter 3. Authoring package metadata
- Chapter 3. Controlling source code and file discovery
- Chapter 3. Including non-Python files in a package
- Chapter 3. Summary
- Part 2. Creating a viable package
- Chapter 4. Handling package dependencies, entry points, and extensions
- Chapter 4. Creating a C extension for Python
- Chapter 4. Offering command-line tools from a Python package
- Chapter 4. Specifying dependencies for Python packages
- Chapter 4. Summary
- Chapter 5. Building and maintaining a test suite
- Chapter 5. Addressing testing tedium
- Chapter 5. Summary
- Chapter 6. Automating code quality tooling
- Chapter 6. Analyzing type safety
- Chapter 6. Creating a tox environment for code formatting
- Chapter 6. Creating a tox environment for linting
- Chapter 6. Summary
- Part 3. Going public
- Chapter 7. Automating work through continuous integration
- Chapter 7. Continuous integration with GitHub Actions
- Chapter 7. Converting manual tasks to GitHub Actions
- Chapter 7. Publishing a package
- Chapter 7. Summary
- Chapter 8. Authoring and maintaining documentation
- Chapter 8. Starting your documentation with Sphinx
- Chapter 8. Publishing documentation to Read the Docs
- Chapter 8. Documentation best practices
- Chapter 8. Summary
- Chapter 9. Making a package evergreen
- Chapter 9. Getting the most out of GitHub
- Chapter 9. Thresholding test coverage
- Chapter 9. Updating Python syntax using pyupgrade
- Chapter 9. Reducing rework using pre-commit hooks
- Chapter 9. Summary
- Part 4. The long haul
- Chapter 10. Scaling and solidifying your practices
- Chapter 10. Using namespace packages
- Chapter 10. Scaling packaging in your organization
- Chapter 10. Summary
- Chapter 11. Building a community
- Chapter 11. Provide supporting documentation for different user types
- Chapter 11. Establish, provide, and enforce a code of conduct
- Chapter 11. Conveying the project’s road map, status, and changes
- Chapter 11. Gather consistent information with issue templates
- Chapter 11. Go forth
- Chapter 11. Summary
- Appendix A. Installing asdf and python-launcher
- Appendix A. Installing python-launcher
- Appendix B. Installing pipx, build, tox, pre-commit, and cookiecutter
- Appendix B. Installing build
- Appendix B. Installing tox
- Appendix B. Installing pre-commit
- Appendix B. Installing cookiecutter
Product information
- Title: Publishing Python Packages, Video Edition
- Author(s):
- Release date: February 2023
- Publisher(s): Manning Publications
- ISBN: None
You might also like
book
Publishing Python Packages
Create masterful, maintainable Python packages! This book includes pro tips for design, automation, testing, deployment, and …
video
Classic Computer Science Problems in Python video edition
"Whether you're a novice or a seasoned professional, there's an Aha! moment in this book for …
video
Let's build a Python package!
Build and publish a Python package from scratch! About the Technology About the Video What's Inside …
book
Practical Docker with Python: Build, Release, and Distribute Your Python App with Docker
Learn the fundamentals of containerization and get acquainted with Docker. This second edition builds upon the …