{"id":13468733,"url":"https://github.com/pex-tool/pex","last_synced_at":"2026-04-07T01:01:33.202Z","repository":{"id":18856246,"uuid":"22072746","full_name":"pex-tool/pex","owner":"pex-tool","description":"A tool for generating .pex (Python EXecutable) files, lock files and venvs.","archived":false,"fork":false,"pushed_at":"2026-03-31T23:20:38.000Z","size":17122,"stargazers_count":4197,"open_issues_count":57,"forks_count":310,"subscribers_count":52,"default_branch":"main","last_synced_at":"2026-04-02T09:33:16.257Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://docs.pex-tool.org/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pex-tool.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":"jsirois"}},"created_at":"2014-07-21T17:06:12.000Z","updated_at":"2026-04-01T15:51:33.000Z","dependencies_parsed_at":"2023-01-14T12:55:11.227Z","dependency_job_id":"bf1b2158-56fa-429a-8feb-c9e77e20c329","html_url":"https://github.com/pex-tool/pex","commit_stats":{"total_commits":1325,"total_committers":131,"mean_commits":"10.114503816793894","dds":0.4075471698113208,"last_synced_commit":"a43c48c2a4b18b352be2c3175e0ae363ff8876d7"},"previous_names":["pex-tool/pex","pantsbuild/pex"],"tags_count":456,"template":false,"template_full_name":null,"purl":"pkg:github/pex-tool/pex","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pex-tool%2Fpex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pex-tool%2Fpex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pex-tool%2Fpex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pex-tool%2Fpex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pex-tool","download_url":"https://codeload.github.com/pex-tool/pex/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pex-tool%2Fpex/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31495466,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-06T17:22:55.647Z","status":"ssl_error","status_checked_at":"2026-04-06T17:22:54.741Z","response_time":112,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T15:01:17.758Z","updated_at":"2026-04-07T01:01:32.951Z","avatar_url":"https://github.com/pex-tool.png","language":"Python","readme":"***\nPEX\n***\n.. image:: https://github.com/pex-tool/pex/actions/workflows/ci.yml/badge.svg?branch=main\n   :target: https://github.com/pex-tool/pex/actions?query=branch%3Amain+workflow%3ACI\n\n.. image:: https://img.shields.io/pypi/l/pex.svg\n   :target: https://pypi.org/project/pex/\n\n.. image:: https://img.shields.io/pypi/v/pex.svg\n   :target: https://pypi.org/project/pex/\n\n.. image:: https://img.shields.io/pypi/pyversions/pex.svg\n   :target: https://pypi.org/project/pex/\n\n.. image:: https://img.shields.io/pypi/wheel/pex.svg\n   :target: https://pypi.org/project/pex/#files\n\n.. image:: https://img.shields.io/discord/1205942638763573358\n   :target: https://pex-tool.org/discord\n\n.. contents:: **Contents**\n\nOverview\n========\npex is a library for generating .pex (Python EXecutable) files which are\nexecutable Python environments in the spirit of `virtualenvs \u003chttps://virtualenv.pypa.io\u003e`_.\npex is an expansion upon the ideas outlined in\n`PEP 441 \u003chttps://peps.python.org/pep-0441/\u003e`_\nand makes the deployment of Python applications as simple as ``cp``.  pex files may even\ninclude multiple platform-specific Python distributions, meaning that a single pex file\ncan be portable across Linux and OS X.\n\npex files can be built using the ``pex`` tool.  Build systems such as `Pants\n\u003chttp://pantsbuild.org/\u003e`_, `Buck \u003chttp://facebook.github.io/buck/\u003e`_, and  `{py}gradle \u003chttps://github.com/linkedin/pygradle\u003e`_  also\nsupport building .pex files directly.\n\nStill unsure about what pex does or how it works?  Watch this quick lightning\ntalk: `WTF is PEX? \u003chttps://www.youtube.com/watch?v=NmpnGhRwsu0\u003e`_.\n\npex is licensed under the Apache2 license.\n\n\nInstallation\n============\n\nTo install pex, simply\n\n.. code-block:: bash\n\n    $ pip install pex\n\nYou can also build pex in a git clone using uv:\n\n.. code-block:: bash\n\n    $ uv run dev-cmd package\n    $ cp dist/pex ~/bin\n\nThis builds a pex binary in ``dist/pex`` that can be copied onto your ``$PATH``.\nThe advantage to this approach is that it keeps your Python environment as empty as\npossible and is more in-line with what pex does philosophically.\n\n\nSimple Examples\n===============\n\nLaunch an interpreter with ``requests``, ``flask`` and ``psutil`` in the environment:\n\n.. code-block:: bash\n\n    $ pex requests flask 'psutil\u003e2,\u003c3'\n\nSave Dependencies From Pip\n~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nOr instead freeze your current virtualenv via requirements.txt and execute it anywhere:\n\n.. code-block:: bash\n\n    $ pex $(pip freeze) -o my_virtualenv.pex\n    $ deactivate\n    $ ./my_virtualenv.pex\n\nEphemeral Environments\n~~~~~~~~~~~~~~~~~~~~~~\n\nRun webserver.py in an environment containing ``flask`` as a quick way to experiment:\n\n.. code-block:: bash\n\n    $ pex flask -- webserver.py\n\nLaunch Sphinx in an ephemeral pex environment using the Sphinx entry point ``sphinx:main``:\n\n.. code-block:: bash\n\n    $ pex sphinx -e sphinx:main -- --help\n\nUsing Entry Points\n~~~~~~~~~~~~~~~~~~\n\nProjects specifying a ``console_scripts`` entry point in their configuration\ncan build standalone executables for those entry points.\n\nTo build a standalone ``pex-tools-executable.pex`` binary that runs the\n``pex-tools`` console script found in all pex version ``2.1.35`` and newer distributions:\n\n.. code-block:: bash\n\n    $ pex \"pex\u003e=2.1.35\" --console-script pex-tools --output-file pex-tools-executable.pex\n\nSpecifying A Specific Interpreter\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nYou can also build pex files that use a specific interpreter type:\n\n.. code-block:: bash\n\n    $ pex \"pex\u003e=2.1.35\" -c pex-tools --python=pypy -o pex-tools-pypy-executable.pex\n\nMost pex options compose well with one another, so the above commands can be\nmixed and matched, and equivalent short options are available.\n\nFor a full list of options, just type ``pex --help``.\n\n\nDocumentation\n=============\n\nMore documentation about Pex, building .pex files, and how .pex files work\nis available at https://docs.pex-tool.org.\n\n\nDevelopment\n===========\n\nPex uses `uv \u003chttps://docs.astral.sh/uv/\u003e`_ with `dev-cmd \u003chttps://pypi.org/project/dev-cmd/\u003e`_ for\ntest and development automation. After you have installed `uv`, to run the Pex test suite, just\nrun `dev-cmd` via `uv`:\n\n.. code-block:: bash\n\n    $ uv run dev-cmd\n\nThe `dev-cmd` command runner provides many useful options, explained at\nhttps://pypi.org/project/dev-cmd/ . Below, we provide some of the most commonly used commands when\nworking on Pex, but the docs are worth acquainting yourself with to better understand how `dev-cmd`\nworks and how to execute more advanced work flows.\n\nTo run a specific command, identify the name of the command you'd like to invoke by running\n``uv run dev-cmd --list``, then invoke the command by name like this:\n\n.. code-block::\n\n    $ uv run dev-cmd format\n\nThat's a fair bit of typing. An shell alias is recommended, and the standard is `uvrc` which I'll\nuse from here on out.\n\nTo run MyPy:\n\n.. code-block::\n\n    $ uvrc typecheck\n\nAll of our tests allow passthrough arguments to `pytest`, which can be helpful to run specific\ntests:\n\n.. code-block::\n\n    $ uvrc test-py37-integration -- -k test_reproducible_build\n\nTo run Pex from source, rather than through what is on your PATH, invoke via Python:\n\n.. code-block::\n\n    $ python -m pex\n\n","funding_links":["https://github.com/sponsors/jsirois"],"categories":["Python","Miscellaneous","Code Packaging"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpex-tool%2Fpex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpex-tool%2Fpex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpex-tool%2Fpex/lists"}