Developing Python Packages
Learn to create your own Python packages to make your code easier to use and share with others.
Kurs Kostenlos Starten4 Stunden14 Videos47 Übungen16.581 LernendeLeistungsnachweis
Kostenloses Konto erstellen
oder
Durch Klick auf die Schaltfläche akzeptierst du unsere Nutzungsbedingungen, unsere Datenschutzrichtlinie und die Speicherung deiner Daten in den USA.Trainierst du 2 oder mehr?
Versuchen DataCamp for BusinessBeliebt bei Lernenden in Tausenden Unternehmen
Kursbeschreibung
Do you find yourself copying and pasting the same code between files, wishing it was easier to reuse and share your awesome snippets? Wrapping your code into Python packages can help! In this course, you’ll learn about package structure and the extra files needed to turn loose code into convenient packages. You'll also learn about import structure, documentation, and how to maintain code style using flake8. You’ll then speed up your package development by building templates, using cookiecutter to create package skeletons. Finally, you'll learn how to use setuptools and twine to build and publish your packages to PyPI—the world stage for Python packages.
Trainierst du 2 oder mehr?
Verschaffen Sie Ihrem Team Zugriff auf die vollständige DataCamp-Plattform, einschließlich aller Funktionen.In den folgenden Tracks
Python-Entwickler
Gehe zu Track- 1
From Loose Code to Local Package
KostenlosGet your package started by converting scripts you have already written. You'll create a simple package which you can use on your own computer.
Starting a package50 xpModules, packages and subpackages100 xpFrom script to package100 xpPutting your package to work100 xpDocumentation50 xpWriting function documentation with pyment100 xpWriting function documentation with pyment II100 xpPackage and module documentation100 xpStructuring imports50 xpSibling imports100 xpImporting from parents100 xpExposing functions to users100 xp - 2
Install Your Package from Anywhere
Make your package installable for yourself and others. In this chapter, you'll learn to deal with dependencies, write READMEs, and include licenses. You'll also complete all the steps to publish your package on PyPI—the main home of Python packages.
Installing your own package50 xpAdding the setup script100 xpInstalling your package locally100 xpUtilizing editable installs100 xpDealing with dependencies50 xpUser dependencies100 xpDevelopment dependencies100 xpIncluding licences and writing READMEs50 xpWriting a README100 xpMANIFEST - Including extra files with your package100 xpPublishing your package50 xpBuilding a distribution100 xpUploading distributions100 xp - 3
Increasing Your Package Quality
Bring your package up to a professional standard. Discover how to use pytest to guard against errors, tox to test if your package functions with multiple versions of Python, and flake8 to maintain great code style.
Testing your package50 xpCreating the test directory100 xpWriting some basic tests100 xpRunning your tests100 xpTesting your package with different environments50 xpSetting up tox100 xpRunning tox100 xpKeeping your package stylish50 xpAppropriate style filtering50 xpUsing flake8 to tidy up a file100 xpIgnoring specific errors100 xpConfiguring flake8100 xp - 4
Rapid Package Development
Create your packages more quickly. In this final chapter, you’ll learn how to use cookiecutter to generate all the supporting files your package needs, Makefiles to simplify releasing new versions, and be introduced to the last few files your package needs to attract users and contributors.
Trainierst du 2 oder mehr?
Verschaffen Sie Ihrem Team Zugriff auf die vollständige DataCamp-Plattform, einschließlich aller Funktionen.In den folgenden Tracks
Python-Entwickler
Gehe zu TrackMitwirkende
James Fulton
Mehr AnzeigenClimate Informatics Researcher
Was sagen andere Lernende?
Melden Sie sich an 15 Millionen Lernende und starten Sie Developing Python Packages Heute!
Kostenloses Konto erstellen
oder
Durch Klick auf die Schaltfläche akzeptierst du unsere Nutzungsbedingungen, unsere Datenschutzrichtlinie und die Speicherung deiner Daten in den USA.