Skip to main content

Vendy is a tool for vendoring third-party packages into your project.

Disclaimer:

This is not an officially supported Google product.

Example:

In a pyproject.toml file in the root of your package, define the target directory (should be in the same directory as the pyproject.toml file), and the packages to vendor:

[tool.vendy]
target = 'my_project'
packages = [
    "sampleproject==1.2.0",
]

On the command line:

$ python -m vendy
[vendy] Using vendor dir: /private/tmp/my_project/my_project/_vendor
[vendy] Cleaning /private/tmp/my_project/my_project/_vendor
[vendy] Installing vendored libraries
Collecting sampleproject==1.3.0
  Using cached https://files.pythonhosted.org/packages/a1/fd/3564a5176430eac106c27eff4de50b58fc916f5083782062cea3141acfaa/sampleproject-1.3.0-py2.py3-none-any.whl
Installing collected packages: sampleproject
Successfully installed sampleproject-1.3.0
[vendy] Detected vendored libraries: bin, my_data, sample
[vendy] Rewriting all imports related to vendored libs
[vendy] Downloading licenses
Collecting sampleproject==1.3.0
  Using cached https://files.pythonhosted.org/packages/a6/aa/0090d487d204f5de30035c00f6c71b53ec7f613138d8653eebac50f47f45/sampleproject-1.3.0.tar.gz
  Saved ./my_project/_vendor/__tmp__/sampleproject-1.3.0.tar.gz
Successfully downloaded sampleproject
[vendy] Extracting sampleproject-1.3.0/LICENSE.txt into my_project/_vendor/sampleproject.LICENSE.txt
[vendy] Revendoring complete

Result:

$ tree
.
├── my_project
│   ├── __init__.py
│   └── _vendor
│       ├── bin
│       │   └── sample
│       ├── my_data
│       │   └── data_file
│       ├── sample
│       │   ├── __init__.py
│       │   └── package_data.dat
│       └── sampleproject.LICENSE.txt
└── pyproject.toml

And you can import from the vendored library like:

-from sampleproject.foo import bar
+from myproject._vendor.sampleproject.foo import bar

Download files

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

Source Distribution

vendy-0.0.3.tar.gz (10.3 kB view details)

Uploaded Source

Built Distribution

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

vendy-0.0.3-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file vendy-0.0.3.tar.gz.

File metadata

  • Download URL: vendy-0.0.3.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for vendy-0.0.3.tar.gz
Algorithm Hash digest
SHA256 d80f212b59b956c0e31c958d1d27dee747e6b2c119a6622f4ea87e81d8385a03
MD5 25a14add577d8b6bd9f86519dfccb51c
BLAKE2b-256 c1ec56e9280d772964255d7cea51ac48050981bf287012b6ff5450ceae5b1c19

See more details on using hashes here.

File details

Details for the file vendy-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: vendy-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.4

File hashes

Hashes for vendy-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 d9af12563e7d1e2d829cec5c4b88f8c3d9bf6e1e108a24b79e5128bf7cb972ff
MD5 3499f622b549999b75508dc5445dc023
BLAKE2b-256 a87a95babb035f49a5cda516e93ed7a7218ecccac466aef92bf3310b5436389b

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.0.3 This release

2 files

0.0.2

2 files

0.0.1

2 files

Supported by

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