{"id":30690538,"url":"https://github.com/pplu/cloudformation-loader","last_synced_at":"2025-09-02T02:43:25.179Z","repository":{"id":312247217,"uuid":"1046380975","full_name":"pplu/cloudformation-loader","owner":"pplu","description":"Import Python code embedded in CloudFormation Templates without hassle. Helps make your Lambdas testeable","archived":false,"fork":false,"pushed_at":"2025-08-29T09:50:37.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-29T13:39:45.141Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pplu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-08-28T15:48:54.000Z","updated_at":"2025-08-29T09:50:41.000Z","dependencies_parsed_at":"2025-08-29T13:41:25.509Z","dependency_job_id":"6f2f1111-ba63-4dcd-bb9b-cf3a8a1ece76","html_url":"https://github.com/pplu/cloudformation-loader","commit_stats":null,"previous_names":["pplu/cloudformation-loader"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/pplu/cloudformation-loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcloudformation-loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcloudformation-loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcloudformation-loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcloudformation-loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pplu","download_url":"https://codeload.github.com/pplu/cloudformation-loader/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pplu%2Fcloudformation-loader/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273222644,"owners_count":25066793,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-09-02T02:43:22.892Z","updated_at":"2025-09-02T02:43:25.165Z","avatar_url":"https://github.com/pplu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloudformation-loader\n\nImport Python code embedded in CloudFormation Templates without hassle\n\n## Description\n\nWhen you author Lambda Functions inside CloudFormation templates you often have the choice of inlining the \ncode or maintaining the code externally.\n\nMaintaining the Lambda code separate from the CloudFormation Template forces you to use a solution that packages and uploads the code for you (SAM, CDK, etc). It makes testing very easy, since we can import our Lambda code as any other Python file via imports, but it is often a hassle because you have to have utilities installed in your environment.\n\nInlining the code is very convenient because you don't have to worry about multiple files or external utilities, but it makes testing almost impossible (since the code is \"locked\" inside the CloudFormation Template). Until now.\n\n## Usage\n\n```\nimport cloudfomation_loader\ncloudformation_loader.import_from_cloudformation('mycloudformation.yaml', 'module_name', 'LambdaLogicalId')\n\nimport module_name\n\n# call and use the code inside the Lambda Function\nmodule_name.my_function('test')\n\n# you can even call the handler\nmodule_name.handler({ 'testing': 'me' })\n\n# or use pytest\nimport pytest\nassert module_name.my_function('test') == 42\n```\n\n## Contributions\n\nThanks to Yuriy Kurylyak for ideas and feedback.\n\nThe CloudFormation YAML loading code was taken from https://github.com/awslabs/aws-cfn-template-flip\n\nContributions are more than welcome.\n\nThe source code is located here: https://github.com/pplu/cloudformation-loader\n\nIssuses can be opened here: https://github.com/pplu/cloudformation-loader/issues\n\n## Author\n\nJose Luis Martinez Torres (pplusdomain@gmail.com)\n\n## Copyright and License\n\nCopyright (c) 2025 by Jose Luis Martinez Torres\n\nThis project is Apache-2.0\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpplu%2Fcloudformation-loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpplu%2Fcloudformation-loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpplu%2Fcloudformation-loader/lists"}