Skip to content

A Python API for interacting with Pulumi resource providers

License

Notifications You must be signed in to change notification settings

cfeenstra67/pylumi

Repository files navigation

Pylumi

Tests Passing Build Passing Documentation Status Latest PyPI version PyPI License

Purpose

Pylumi is a Python API providing the ability to manage pulumi resource plugin contexts and interact with the resource Provider interface. It was originally created to allow statey to re-use Pulumi resource providers, however the implementation is generic and could be reused for anything as desired.

Usage Example

import pylumi

with pylumi.Context() as ctx, \
     ctx.provider('aws', {'region': 'us-east-1'}) as aws:

    resp = aws.create(
        pylumi.URN('aws:s3/bucketObject:BucketObject'),
        {'bucket': 'some-bucket', 'key': 'some-key', 'content': 'Hello, world!'},
    )

Installation

Before installing pylumi, you must have Go installed on your system. For additional information, see the Go Programming Language Installation Page.

Once that is done, install this package using:

$ pip install pylumi

_NOTE_: There are only wheels available for Mac OS X. If you are trying to download on Linux, you'll have to have Go 1.16+ installed.

Compatibility

Tests are passing on Mac OS X and Ubuntu, see recent test runs in Actions for details.

Documentation

Documentation for Pylumi is hosted on Read the Docs: https://pylumi.readthedocs.io/.

Development

In order to build for development, you'll want to install all of the Python requirements first:

$ pip install -r requirements.txt -r requirements-tests.txt -r requirements-dev.txt

Then build the extension modules. You will need Go 1.16+ installed on your system:

$ python setup.py build_ext --inplace

Contact

If you have issues using this repository please open a issue or reach out to me at cameron.l.feenstra@gmail.com.

About

A Python API for interacting with Pulumi resource providers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published