-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pull out the terminology section to its own document
- Loading branch information
Showing
4 changed files
with
91 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,4 +4,5 @@ Python | |
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
terminology | ||
packaging_and_distribution |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
## Some Terminology | ||
|
||
Provide explanations of Python terminology that a user might encounter. | ||
|
||
|
||
## Purpose for this guideline | ||
Like all programming languages, Python has some terminology that is unique to it and it is helpful to have that language | ||
explained. This page may be updated over time so that it holds the most useful terminology to those that use this | ||
developer's guide. | ||
|
||
### Library Packages vs Applications vs Scripts | ||
|
||
Python is a highly flexible interpreted language. This means it's easy to get started, quick to write, and easy to run. | ||
Unfortunately, this also means it's very easy to write code that works in one context but not in others or code that is | ||
robust but isn't designed to be inherited. | ||
|
||
**Library Package**: A python package, intended for redistribution, containing objects that serve as building blocks for | ||
other developers to use. Examples are `numpy`, `pytest`, and `sqlalchemy`. | ||
|
||
**Application**: A python project (which may or may not be a packaged distribution) that provides specific and possibly | ||
configurable functionality. Examples are Poetry, the AWS CLI, the Conda CLI, the Green Unicorn WSGI HTTP server, any | ||
Django "app". | ||
|
||
**Script**: Pretty much anything else written in Python. One could arguably say that a Script is just a trivial Application | ||
with little configuration or portability. Scripts are usually run with `python my_script.py argv`. They tend to be | ||
difficult to maintain, update, or distribute. | ||
|
||
> **Note** A Python "package" is any directory containing an `__init__.py` file. | ||
Packaging Tooling: Not only managing a local environment, but also providing tooling for developing, building, and | ||
distributing python packages for other users. While Conda does support this use case (it's how one creates and | ||
distributes conda packages to `conda-forge`), Poetry and `setuptools` are much easier to develop with (for PyPI) and Poetry | ||
boasts a similar dependency resolver to Conda. One major drawback to Conda in packaging is that there is no notion of an | ||
"editable install" so the developer is forced to build and test end user functionality (e.g. script entrypoints) over | ||
and over instead of simply making code changes in place. | ||
|
||
## Useful Links | ||
Helpful links to additional resources on the topic | ||
|
||
Credit: Content taken from a Confluence page originally written by Gavin Medley |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters