Skip to main content

xldeploy-py

Python SDK for Digital.ai Deploy.

Usage

import xldeploy

config = xldeploy.Config(protocol="http", host="localhost", port="4516", context_path="deployit", username="admin", password="admin")

# If you are using url
config = xldeploy.Config.initialize(url="http://localhost:4516/deployit", username="admin", password="admin")

# If you are using proxies
config = xldeploy.Config(protocol="http", host="localhost", port="4516", context_path="deployit", username="admin", password="admin",  proxy_host="localhost", proxy_port=8080, proxy_username="proxyUsername", proxy_password="proxyPassword")

# If you are using PAT (Personal Access Token) authentication
config = xldeploy.Config(protocol="http", host="localhost", port="4516", context_path="deployit", token="dpa_xxxxx", authentication_method="pat")

# or
config = xldeploy.Config()
client = xldeploy.Client(config)

# repository
repository = client.repository
print(repository.exists("Applications/EC2/1.0/ec2"))
print(repository.exists("Applications/EC2/1.0/wrong"))
ci = repository.read("Applications/EC2/1.0/ec2")
print(ci.amiId)

# deployment
deployment = client.deployment
deploymentRef = deployment.prepare_initial("Applications/NIApp/1.0", "Environments/awsEnv")
depl = deployment.prepare_auto_deployeds(deploymentRef)
task = deployment.create_task(depl)
task.start()
print(task.task_id)

# Deployfile

## Apply Deployfile script.

import re
from os import path

deployfile = client.deployfile
deploy_file = open('deploy_file_path', 'rb').read()
file_names = re.findall('upload\([\'|"](.*)[\'|"]\)', deploy_file.decode("utf-8"))
files_to_upload = [path.abspath(path.join(path.abspath(path.join(file_path, "..")), name)) for name in file_names]

deployfile.apply('deploy_file_path',files_to_upload)

## POST of multiple multipart-encoded binary files

Based on Python [requests](https://pypi.python.org/pypi/requests) module, see [docs](http://docs.python-requests.org/en/master/user/advanced/#advanced)

## Generate Deployfile script.

deployfile = client.deployfile
deployfile.generate([Environments/directory1,Environments/directory1])

Installing from the PyPi repository

$ pip install xldeploy-py

Installing package directly from source

$ cd xldeploy-py
$ pip install --editable .

Metadata

Release files for xldeploy-py 0.0.23

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

Source distribution (sdist)

Source distribution for xldeploy-py 0.0.23
File Size Uploaded Provenance Actions
xldeploy_py-0.0.23.tar.gz 14.1 kB Without provenance Details for xldeploy_py-0.0.23.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for xldeploy-py 0.0.23
File Interpreter ABI Platform Actions
xldeploy_py-0.0.23-py3-none-any.whl Python 3 none any Details for xldeploy_py-0.0.23-py3-none-any.whl

Total release size: 33.5 kB

Release files / xldeploy_py-0.0.23.tar.gz

Download URL xldeploy_py-0.0.23.tar.gz
Size 14.1 kB
Tags Source
SHA-256 checksum
How to use checksums
4eb67bd59a1e906ca41374a347ebe291e6edfc3c253afcebdd763641bde9316c
BLAKE2b-256 checksum
How to use checksums
a6f1404a1cd8fe324f99a18d3991e97798895924c6d37d2d7038247e965f0876
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Release files / xldeploy_py-0.0.23-py3-none-any.whl

Download URL xldeploy_py-0.0.23-py3-none-any.whl
Size 19.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cb8542aa4eee1e652884f73ba09f2bbe00b5817e770362c761697878c5619560
BLAKE2b-256 checksum
How to use checksums
d27c39639ac8ad53b13be765ae33b86fc452921f90336ae229313fc5985dc186
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.12.3

Security for xldeploy-py 0.0.23

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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