https://pulumi.com logo
#python
Title
# python
b

broad-church-78931

04/08/2021, 12:57 PM
Does anyone know if there are some good ways to abstract Pulumi code with Python? Some samples on the internet?
r

red-match-15116

04/08/2021, 4:39 PM
I’m not sure what exactly you’re looking for but here’s some pulumi examples in python: https://github.com/pulumi/examples#python
b

broad-church-78931

04/09/2021, 2:27 PM
I have checked these but I was looking for some higher lever abstraction on the top like wrapping things to bigger reusable classes/objects without going too much into implementation details
by details I mean like not need to define things like clusters, security groups, load balancers. More like having higher level constructs
This is to a direction what I was asking about https://github.com/pulumi/pulumi-cloud
r

red-match-15116

04/10/2021, 2:05 AM
Most of our higher-level abstraction libraries are in typescript, with the exception of https://github.com/pulumi/pulumi-eks which is written in typescript and then generated in all Pulumi languages including python. But the same patterns used in any of these libraries (like cloud, which you’ve found, or https://github.com/pulumi/pulumi-awsx) can be used for python as well.
What you’re looking for, essentially, are component resources, which you can read more about here if that’s helpful.