Skip to main content

When you are about to create a python program that depends on some packages, you may setup virtualenv and install some packages within that virtualenv manually. This module automatically creates an environment and installs packages in it.

Setup

Requirements

  • python 2.7, 3.3 or later

  • pip

  • virtualenv

Installation

$ pip install vebootstrap

Usage

Importing Pattern

Insert following line into head of your script file, and create a requirements.txt in same directory as necessary.

import vebootstrap

Running that script, it creates a virtualenv and modules will be installed automatically.

Not Importing Pattern

If you do not want to add a unconcerned line, run following command and then virtualenv will be prepared and activated.

python -m vebootstrap [script file]

Example

Case: you want to create a script using `requests` module. (http request library)

Create a script file (eg. get_yahoo.py)

import vebootstrap # you must write this sentence at the first import requests print(requests.get(’http://yahoo.co.jp’).content[:100])

Create a requirements.txt

requests

Run a script

python get_yahoo.py

At first, virtualenv directory will be created and required packages will be installed. And you get a first line of html of the Yahoo.

Extra Usage

Init virtualenv

Following command initialize virtualenv directory and install modules.

python -m vebootstrap.init

Create a virtualenv bootstrap script

vebootstrap supports creating virtualenv bootstrap script. Run a following command in your scripting directory. The bootstrap script involving requirements.txt will be created.

python -m vebootstrap.create_bootstrap

–after-install option allows you to add another process into the bootstrap script. Please see help.

python -m vebootstrap.create_bootstrap –help

Release files for vebootstrap 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vebootstrap 0.0.14
File Size Uploaded
vebootstrap-0.0.14.zip 11.5 kB Details

Release files / vebootstrap-0.0.14.zip

Download URL vebootstrap-0.0.14.zip
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
a9d450f36d403ec5007a748c41ca215c948030ea5a0d1788c834e36e61fb706c
BLAKE2b-256 checksum
How to use checksums
87dfab0f20ec2c7910c1936627fefa642c187f061836f33f68ea24d06fef5886
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.0.14 This release

1 release file

0.0.13

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.10

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page