Skip to main content

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

Project description

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:

$ 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

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

vendy-0.0.1.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

vendy-0.0.1-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vendy-0.0.1.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for vendy-0.0.1.tar.gz
Algorithm Hash digest
SHA256 8abfbd50779e8fad0e81679d4c236ed55d7a3b1bc3d1c4362fc146ea603aa746
MD5 2d755916568b576b72e583a603084d04
BLAKE2b-256 92ae33de30e4463a0d36fbbb73245cd9cf36ccfce9af55fb51e63ba9d3a75778

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vendy-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.19.1 setuptools/41.0.1 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.7.0

File hashes

Hashes for vendy-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 139a19b6019f56c71d8fd2df822729865b92cd8282f682001c63c2cb9a198a6b
MD5 c607bdbe8b5146b5adb183837026fcdf
BLAKE2b-256 16ed93802448bf9210cba289a7f6d044231572706b88cddba61b611e6f457a1d

See more details on using hashes here.

Supported by

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