xenvman client for Python
Project description
Python client for xenvman
This is a Python client library for xenvman.
Installation
Installing is a simple as running:
pip install xenvman
Usage
The very first thing to do is to create a client:
import xenvman
cl = xenvman.Client()
if address argument is not provided, the default http://localhost:9876
will be used. Also if shell environment variable XENV_API_SERVER is set,
it will be used instead.
Once you have a client, you can create environment:
env = cl.new_env(xenvman.InputEnv(
"python-test",
description="Python test!",
templates=[
xenvman.Tpl("db/mongo")
],
))
And that's it! Once new_env() returns, you have an environment which you can
start using in your integration tests.
cont = env.get_container("db/mongo", 0, "mongo")
# Get the full mongo url with exposed port
mongo_url = "{}:{}".format(env.external_address(), cont.ports["27017"])
Don't forget to terminate your env after you're done:
env.terminate()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xenvman-0.0.1.tar.gz.
File metadata
- Download URL: xenvman-0.0.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8e8b53e66f5df8fafd3b59375f0916e9e9a739e0ceeb12543c587ee5c1358e0
|
|
| MD5 |
269317dfa90a3932aafa92ac3fdd418e
|
|
| BLAKE2b-256 |
736ec0a66807356391f7d5af61e9a58adf6acd199fb2754b989ebad3f692f7dd
|
File details
Details for the file xenvman-0.0.1-py3-none-any.whl.
File metadata
- Download URL: xenvman-0.0.1-py3-none-any.whl
- Upload date:
- Size: 8.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.7.2 requests-toolbelt/0.9.1 tqdm/4.30.0 CPython/3.7.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e3218bbed89599cd3a776c084733efc9f39c28dcb7b722a4fa7483ff9cb1568
|
|
| MD5 |
4583b12aaba988c4dbf49d780a86ca4d
|
|
| BLAKE2b-256 |
4e2f313c1a1a46f9832f740bb38db5b6e181d9224c0f3456e0d5d41b69b7039f
|