Evolven API Python Client
Project description
Evolven API Python
Evolven API Python is a client library for Evolven's server APIs. It provides an abstraction on top of raw Evolven API calls to interact with Evolven Server. To get started, check out the examples or read the documentation:
- Evolven API Python documentation: Show examples
- HTTP API documentation: https://customers.evolven.com
- Evolven Software: https://www.evolven.com
Installation
To install from pip:
pip install evolven
To install from source:
python setup.py install
Evolven API
The library provides a Python wrapper around the Evolven API and the Evolven data model. The library utilizes models to represent API calls to various objects:
api.Hostapi.Environmentapi.CIapi.Changeapi.Agent
The results are returned either as python objects, json, string or Pandas DataFrame. Fields for particular model match specified fields in Evolven API documentation.
The API is exposed via the api.EvolvenAPI class. To create an instance of the api.EvolvenAPI with login credentials:
import evolven
api = evolven.EvolvenAPI("my-server.evolven.com", port=443, username="...", password="...")
api.Host.search("US3ALSQL004")
print(d.Next.Environment[0].name)
>>> US3ALSQL004
print(d.Next.Environment[0].env_id)
>>> 128439
Usage
Below are examples of common tasks.
Authenticate with session id
API authentication can be achieved using SecurityKey parameter as follows:
import evolven
api = evolven.EvolvenAPI("my-server.evolven.com", port=443, session="1870b4b....")
Define return type
You can define object return type on class initialization as follows:
api = evolven.EvolvenAPI("my-server.evolven.com", port=443, session="1870b4b....", return_type="DataFrame")
All options are:
"DataFrame"- returns data in normalized form as Pandas DataFrame object"object"- returns data as python object, fields are accesible as class properties"JSON"- returns data in JSON format"string"- returns string representation as returned by HTTP API
List all hosts
hosts = api.Host.list()
hosts
Output:
| Host | HostType | EnvId | Os | ... |
|-------------|----------|-------|------------------------|-----|
| NYUATOLD002 | Prod | 847 | Windows 7 | ... |
| US3ALENG005 | Prod | 512 | Windows Server 2008 R2 | ... |
| ... | ... | ... | ... | ... |
Query Evolven Search
hosts = api.Search.search("Host where cpu-count > 8 | Hotfixes")
hosts
Output:
| CIName | Host | EnvId | Os | ... |
|-----------|--------------|-------|------------------------|-----|
| KB4580325 | NYUATOLD002 | 847 | Windows 7 | ... |
| KB4580325 | US3ALENG005 | 512 | Windows Server 2008 R2 | ... |
| ... | ... | ... | ... | ... |
Additional examples
Additional examples are shown in Jupter notebooks here.
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 evolven-1.1.0.tar.gz.
File metadata
- Download URL: evolven-1.1.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dee860f2d74a8a49b7041a5c7e974c691b4b900cb88ba8e9d48a26cf11de5be1
|
|
| MD5 |
36259e356be3ec539efbbfe06b327adb
|
|
| BLAKE2b-256 |
79ba17a41ee31aea7554dd254e92fb4407754c1befa9927357692a650da391e5
|
File details
Details for the file evolven-1.1.0-py3-none-any.whl.
File metadata
- Download URL: evolven-1.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.7.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d2b24a62ed0268ed2b2a9072d6b60794446df22053e15a5d6cf6ac5a16e9b87b
|
|
| MD5 |
1b4962ea26b4cab57ef3544e9eace211
|
|
| BLAKE2b-256 |
d7ae35053e8ebd657de9c158dc8357e41362b8bdb4b990ed1d712f11f47d7d6d
|