Skip to main content

Automatically build, deploy and distribute Ultimaker Cura Toolbox packages

Project description

# CuraPackageDeployer
Automatically build, deploy and distribute [Ultimaker Cura]( Toolbox packages.

## Introduction
Ultimaker has introduced a new set of tools to build and deploy [packages for Ultimaker Cura](
These packages can extend the functionality and contents of Cura and users can install them via the Cura Toolbox.

One of the new tools available is a web API for managing and distributing these packages.
Besides a [user interface]( consuming this API,
developers can also [use the API]( directly.

This library uses that API to automate the building and deployment of packages.
It's written in Python, so you can use it in your CI/CD system of your choice.

## Installation
Install the library in your plugin project using pip:

pip3 install CuraPackageDeployer

## Usage
The best way to use this library is to make a Python script and use the `CuraPackageDeployer` class from there:

import logging
import sys
import time

from CuraPackageDeployer.Config import Config
from CuraPackageDeployer.CuraPackageDeployer import CuraPackageDeployer

class ExampleConfig(Config):
Example config file that extends the root config.
package_id = "CuraDrive"
package_sources_dir = "/Users/chris/Code/Ultimaker/cura/CuraDrivePlugin/CuraDrive"
tags = ["backups", "cloud", "restore", "configuration", "settings", "sync"]
website = ""
release_notes = "Switched to the new Ultimaker Account functionality baked into Cura."
access_token = "THIS_IS_A_SECRET!"

def main() -> int:
config = ExampleConfig()
deployer = CuraPackageDeployer(config)
time.sleep(3) # Give the API some time to build the package.
return 0

if __name__ == "__main__":
exit_code = main()

Then execute this script in your CI/CD system of choice.

### Docker
We recommend running the script in a Docker container to always have a suitable runtime environment.
An example Dockerfile could be:

FROM python:3.6-alpine AS base
WORKDIR /usr/src/app

RUN pip3 install CuraPackageDeployer

CMD ["python3", ""]
ADD . .

## Contribute
To help improve this project, feel free to make issues or pull requests via GitHub.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for CuraPackageDeployer, version 1.1.0
Filename, size File type Python version Upload date Hashes
Filename, size CuraPackageDeployer-1.1.0.tar.gz (7.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page