(aws_cdk): Allow Python Path objects into functions that need paths
- Dominant language
- TypeScript
- Stars
- 2.9k
- Forks
- 267
- Avg merge
- 1d 25m
- Merged PRs (30d)
- 14
Description
### Describe the feature
Allow using Path object in python for when a path to something is needed.
### Use Case
For example to use a Code.from_asset() function I need to turn my Path object into str. It would be nice to not have to do this cast.
```python
Code.from_asset(str(Path().cwd() / 'aws_infrastructure' / 'lambda_functions')),
```
### Proposed Solution
_No response_
### Other Information
_No response_
### Acknowledgements
- [ ] I may be able to implement this feature request
- [ ] This feature might incur a breaking change
### CDK version used
2.154.1 (build febce9d)
### Environment details (OS name and version, etc.)
Ubuntu 24.04
Contributor guide
Research direction
Start at the Code.from_asset() entry point described in the issue and trace how path arguments are represented across jsii and Python. Check how pathlib.Path values are currently handled, then add coverage showing that a Path can be passed without str(); done means the example works on the stated CDK version without breaking existing string paths.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, typescript
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100