Skip to main content

demo package

Project description

Setuptools

https://setuptools.pypa.io/en/latest/userguide/package_discovery.html []: # https://packaging.python.org/en/latest/tutorials/packaging-projects/ []: # https://packaging.python.org/en/latest/tutorials/packaging-projects/#creating-setup-py []: # https://packaging.python.org/en/latest/tutorials/packaging-projects/#creating-setup-cfg []: # https://packaging.python.org/en/latest/tutorials/packaging-projects/#creating-a-source-distribution []: # https://packaging.python.org/en/latest/tutorials/packaging-projects/#creating-a-wheel []: # https://packaging.python.org/en/latest/tutorials/packaging-projects/#creating-a-binary-distribution []: # https://packaging.python.org/en/latest/tutorials/packaging-projects/#creating-a-wheels

Packaging terms:

  • module: A module is a single file (with a .py extension) that contains Python code. It can define functions, classes, and variables that can be reused in other Python programs. Modules are the smallest unit of code organization in Python.
  • package: A package is a collection of related modules organized in a directory hierarchy. It allows for better organization and management of code, especially in larger projects. A package must contain an init.py file to be recognized as a package by Python.
  • regular package: A regular package is a standard package that contains an init.py file and can include sub-packages and modules. It is the most common type of package used in Python projects.
  • namespace package: A namespace package is a special type of package that allows for the distribution of modules across multiple directories or distributions. It does not require an init.py file and enables different packages to share the same namespace.
  • sub-package: A sub-package is a package that is contained within another package. It allows for further organization of code and can include its own modules and sub-packages. Sub-packages are typically used to group related functionality within a larger package.
  • init.py: The init.py file is a special file that indicates that a directory should be treated as a package. It can be empty or contain initialization code for the package. This file is executed when the package is imported, allowing for package-level variables and functions to be defined.
  • all: The all variable is a list that defines the public interface of a module or package. It specifies which names should be exported when the module is imported using the from module import * syntax. This helps control what is accessible to users and prevents accidental access to internal functions or variables.
  • main: The main module is the entry point of a Python program. It is the module that is executed when a Python script is run directly. The name variable is set to "main" in this context, allowing for conditional execution of code based on whether the module is being run as the main program or imported as a module.
  • name: The name variable is a built-in variable in Python that represents the name of the current module. When a module is run directly, name is set to "main". When it is imported as a module, name is set to the module's name. This allows for conditional execution of code based on how the module is being used.
  • package: The package variable is a built-in variable in Python that represents the name of the package that a module belongs to. It is used to determine the package hierarchy and can be useful for relative imports within packages.
  • file: The file variable is a built-in variable in Python that represents the path to the current module's file. It can be used to determine the location of the module and is often used for loading resources or data files relative to the module's location.
  • path: The path variable is a built-in variable in Python that represents the search path for modules in a package. It is a list of directories that Python searches when importing modules. This variable can be modified to include additional directories for module searching.
  • cached: The cached variable is a built-in variable in Python that represents the path to the compiled bytecode file for a module. It is used to store the compiled version of the module to improve import performance. The cached variable is typically used in conjunction with the file variable to determine the location of the bytecode file.
  • library: A library is a collection of related modules and packages that provide specific functionality. Libraries can be installed and used in Python programs to extend the capabilities of the language. Examples include NumPy, Pandas, and Matplotlib.
  • framework: A framework is a larger, more comprehensive collection of libraries and tools that provide a foundation for building applications. Frameworks often dictate the structure and flow of the application, providing a set of conventions and best practices. Examples include Django, Flask, and React.
  • distribution: A distribution is a packaged version of a library or application that can be easily installed and managed. Distributions are typically created using tools like setuptools or distutils and can be shared via package repositories like PyPI (Python Package Index).
  • dependency: A dependency is a library or package that a project relies on to function correctly. Dependencies can be managed using tools like pip, which allows for easy installation and version management.
  • versioning: Versioning is the practice of assigning unique version numbers to software releases. This helps developers track changes, manage dependencies, and ensure compatibility between different versions of libraries and applications. Semantic versioning (e.g., MAJOR.MINOR.PATCH) is a common convention used in versioning.
  • virtual environment: A virtual environment is an isolated Python environment that allows developers to manage dependencies and packages for a specific project without affecting the global Python installation. This is useful for avoiding version conflicts and ensuring that projects have the necessary dependencies.
  • requirements file: A requirements file is a text file that lists the dependencies required for a Python project. It typically includes the package names and their versions. This file can be used with pip to install all the required packages in a virtual environment.
  • setup.py: A setup.py file is a Python script used to package and distribute a library or application. It contains metadata about the project, such as its name, version, author, and dependencies. This file is typically used with setuptools to create a distribution package.
  • entry point: An entry point is a specific function or method in a library or application that serves as the starting point for execution. It allows users to run the code without needing to know the internal structure of the package. Entry points are often defined in the setup.py file and can be used to create command-line interfaces or plugins.
  • namespace package: A namespace package is a type of package that allows for the distribution of modules across multiple directories or distributions. This enables different packages to share the same namespace, making it easier to organize and manage large codebases. Namespace packages are defined using the init.py file and can be created using tools like setuptools.
  • egg: An egg is a distribution format for Python packages that allows for easy installation and management of dependencies. Eggs can contain both code and metadata about the package, including its dependencies and entry points. The egg format has been largely replaced by the wheel format but is still used in some projects.
  • wheel: A wheel is a distribution format for Python packages that provides a faster and more efficient way to install and manage dependencies. Wheels are binary distributions that can be installed using pip, making them easier to work with than source distributions. The wheel format is now the preferred distribution format for Python packages.
  • source distribution: A source distribution is a distribution format for Python packages that contains the source code and metadata required to build and install the package. Source distributions are typically used when a package cannot be installed as a binary wheel or when users want to modify the source code before installation.
  • build: The process of creating a distribution package from source code. This typically involves compiling the code, generating metadata, and creating the necessary files for installation. The build process can be automated using tools like setuptools or distutils.
  • install: The process of copying a distribution package to the appropriate location in the Python environment, making it available for use in Python programs. This can be done using tools like pip or by running the setup.py script directly.
  • uninstall: The process of removing a distribution package from the Python environment. This can be done using tools like pip or by manually deleting the package files.
  • upgrade: The process of updating a distribution package to a newer version. This can be done using tools like pip, which can automatically handle dependencies and ensure that the latest version is installed.
  • downgrade: The process of reverting a distribution package to an older version. This can be done using tools like pip, which allows users to specify the desired version of the package to install.
  • pip: Pip is the package manager for Python that allows users to install, upgrade, and manage Python packages and dependencies. It is the most widely used tool for managing Python packages and is included with most Python installations.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

togai_my_package-0.0.6.tar.gz (6.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

togai_my_package-0.0.6-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file togai_my_package-0.0.6.tar.gz.

File metadata

  • Download URL: togai_my_package-0.0.6.tar.gz
  • Upload date:
  • Size: 6.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for togai_my_package-0.0.6.tar.gz
Algorithm Hash digest
SHA256 8b3ef5698e766649f51f419a77861c547913160fb7035309911118016ccb0fdd
MD5 2d34755241142160f09fde4f6990a5ad
BLAKE2b-256 646fb90728492d71c9d2055aa1687bc5b74e6d989756b92cd7a319e1ede67814

See more details on using hashes here.

File details

Details for the file togai_my_package-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for togai_my_package-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 314900b4f7fc38f6e816023a17d115e88700b6bc4c56cb0b52719642110a9132
MD5 53383cb8f00a7426337f1a8c68255e65
BLAKE2b-256 0d39e34770cb8e728e88068f3af731dc95ccba4dcd18343d15a4d5a3d7ff377b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page