Channels
esc
welcome
pulumi-cdk
cloudengineering
yaml
blog-posts
localstack
pulumi-ai
package-authoring
policy-as-code
pulumiup-booth-support
oracle-cloud-infrastructure
learn-pulumi-events
linen
registry
built-with-pulumi
pulumi-cloud
contribex
testingtesting321
hacktoberfest
pulumi-crosscode
content-share
finops
multi-language-hackathon
office-hours
workshops
gitlab
general
pulumi-kubernetes-operator
jobs
pulumi-deployments
dotnet
aws
golang
announcements
java
pulumiverse
python
install
getting-started
cloudengineering-support
testingtesting123
hackathon-03-19-2020
typescript
google-cloud
contribute
azure
kubernetes
docs
automation-api
status
Powered by
#python
Title
# python
q
quick-wolf-8403
06/14/2022, 2:32 AM
Possibly dumb question: I'm adding Pulumi to a co-worker's Flask-based API. Would it be appropriate to put Automation API stuff in the module's dunder init file?
__init__.py
g
great-queen-39697
06/14/2022, 2:34 PM
Not a dumb question at all. You certainly can put it in there, but is that where the rest of the API is located? Generally, I like to put it either in its own file that I then call as a module or embed it in the code directly. Here's some examples that might help as you're thinking through what you want where: ā¢
https://github.com/pulumi/automation-api-examples/tree/main/python/pulumi_over_http
ā¢
https://github.com/komalali/self-service-platyform
ā¢
https://www.pulumi.com/learn/embedding-pulumi/building-api/
š 1
q
quick-wolf-8403
06/15/2022, 4:51 PM
I see your point--and I guess this is more of a Python modules standard practices question than an Automation API question. I appreciate the examples!
š 1
2 Views
Post