Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python documentation #2112

Closed
Doug-AWS opened this issue Mar 28, 2019 · 6 comments
Closed

Python documentation #2112

Doug-AWS opened this issue Mar 28, 2019 · 6 comments
Assignees
Labels
docs/guide Related to the developer guide language/python Related to Python bindings needs-reproduction This issue needs reproduction. p0

Comments

@Doug-AWS
Copy link
Contributor

To support the addition of Python to the CDK, we need the following information for the guide:

@Doug-AWS Doug-AWS added documentation p0 language/python Related to Python bindings docs/guide Related to the developer guide labels Mar 28, 2019
@Doug-AWS
Copy link
Contributor Author

Depends on #2009

@dstufft
Copy link
Contributor

dstufft commented Mar 28, 2019

It depends on Python 3.6+, pip version is uh, well pretty much any version that anyone is likely to have.

The installation command depends on which libraries you need to install, the CDK itself is pip install aws-cdk.cdk. You can get a list of all of our libraries at https://pypi.org/user/aws-cdk/.

Upgrading is the same command, but with the `--upgrade`` flag.

I don't think we have the init templates done to port the hello world tutorial over.

@cmclaughlin
Copy link

I don't think we have the init templates done to port the hello world tutorial over.

Trying out the newly added Python support and hit that:

$ cdk --version
0.27.0 (build 7638a58)

$ cdk init --language python
/usr/local/bin/cdk init [TEMPLATE]

Options:
  --app, -a             REQUIRED: Command-line for executing your CDK app (e.g.
                        "node bin/my-app.js")                           [string]
  --context, -c         Add contextual string parameter.                 [array]
  --plugin, -p          Name or path of a node package that extend the CDK
                        features. Can be specified multiple times        [array]
  --rename              Rename stack name if different from the one defined in
                        the cloud executable                            [string]
  --trace               Print trace for stack warnings                 [boolean]
  --strict              Do not construct stacks with warnings          [boolean]
  --ignore-errors       Ignores synthesis errors, which will likely produce an
                        invalid output                [boolean] [default: false]
  --json, -j            Use JSON output instead of YAML                [boolean]
  --verbose, -v         Show debug logs                                [boolean]
  --profile             Use the indicated AWS profile as the default environment
                                                                        [string]
  --proxy               Use the indicated proxy. Will read from HTTPS_PROXY
                        environment variable if not specified.          [string]
  --ec2creds, -i        Force trying to fetch EC2 instance credentials. Default:
                        guess EC2 instance status.                     [boolean]
  --version-reporting   Include the "AWS::CDK::Metadata" resource in synthesized
                        templates (enabled by default)                 [boolean]
  --path-metadata       Include "aws:cdk:path" CloudFormation metadata for each
                        resource (enabled by default)  [boolean] [default: true]
  --asset-metadata      Include "aws:asset:*" CloudFormation metadata for
                        resources that user assets (enabled by default)
                                                       [boolean] [default: true]
  --role-arn, -r        ARN of Role to use when invoking CloudFormation [string]
  --toolkit-stack-name  The name of the CDK toolkit stack               [string]
  --ci                  Force CI detection. Use --no-ci to disable CI
                        autodetection.                [boolean] [default: false]
  --version             Show version number                            [boolean]
  --language, -l        the language to be used for the new project (default can
                        be configured in ~/.cdk.json)
                    [string] [choices: "csharp", "fsharp", "java", "typescript"]
  --list                list the available templates                   [boolean]
  -h, --help            Show help                                      [boolean]

Invalid values:
  Argument: language, Given: "python", Choices: "csharp", "fsharp", "java", "typescript"

@Graham-Beer
Copy link

To use Python make sure you update to CDK version 0.28.0

@Doug-AWS
Copy link
Contributor Author

Be aware that Python support in 0.28.0 on Windows has issues. We'll have a fix out shortly.

@Doug-AWS
Copy link
Contributor Author

Doug-AWS commented May 7, 2019

Python is fully supported in CDK 0.30.0.

@Doug-AWS Doug-AWS closed this as completed May 7, 2019
@SomayaB SomayaB added needs-reproduction This issue needs reproduction. and removed status/needs-sample labels Feb 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs/guide Related to the developer guide language/python Related to Python bindings needs-reproduction This issue needs reproduction. p0
Projects
None yet
Development

No branches or pull requests

6 participants