{"id":23451535,"url":"https://github.com/kanga333/cepan","last_synced_at":"2026-03-11T13:15:27.758Z","repository":{"id":53134193,"uuid":"342598105","full_name":"kanga333/cepan","owner":"kanga333","description":"Retrieves data from aws cost explore as a pandas dataframe.","archived":false,"fork":false,"pushed_at":"2021-04-06T12:17:23.000Z","size":92,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-01-04T21:25:00.587Z","etag":null,"topics":["aws","cost-explorer","pandas","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kanga333.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-02-26T14:20:37.000Z","updated_at":"2023-10-02T12:06:47.000Z","dependencies_parsed_at":"2022-08-25T11:20:53.354Z","dependency_job_id":null,"html_url":"https://github.com/kanga333/cepan","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kanga333/cepan","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcepan","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcepan/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcepan/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcepan/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kanga333","download_url":"https://codeload.github.com/kanga333/cepan/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kanga333%2Fcepan/sbom","scorecard":{"id":549195,"data":{"date":"2025-08-11","repo":{"name":"github.com/kanga333/cepan","commit":"73f2cc58c0482e9548a5f0684fcbe88f3eadce2e"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.4,"checks":[{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/kanga333/cepan/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/lint.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/kanga333/cepan/lint.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/kanga333/cepan/test.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/test.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/kanga333/cepan/test.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/lint.yml:23","Warn: pipCommand not pinned by hash: .github/workflows/test.yml:23","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/25 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/lint.yml:1","Warn: no topLevel permission defined: .github/workflows/test.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 8 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T10:20:04.451Z","repository_id":53134193,"created_at":"2025-08-20T10:20:04.451Z","updated_at":"2025-08-20T10:20:04.451Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30382633,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-11T12:49:11.341Z","status":"ssl_error","status_checked_at":"2026-03-11T12:46:41.342Z","response_time":84,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["aws","cost-explorer","pandas","python"],"created_at":"2024-12-24T00:26:14.613Z","updated_at":"2026-03-11T13:15:27.742Z","avatar_url":"https://github.com/kanga333.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cepan\n\n[![Pypi Version](https://img.shields.io/pypi/v/cepan?color=blue)](https://pypi.org/project/cepan/#history)\n[![python](https://img.shields.io/pypi/pyversions/cepan.svg)](https://pypi.org/project/cepan/)\n[![test](https://github.com/kanga333/cepan/actions/workflows/test.yml/badge.svg?branch=main)](https://github.com/kanga333/cepan/actions/workflows/test.yml)\n[![lint](https://github.com/kanga333/cepan/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/kanga333/cepan/actions/workflows/lint.yml)\n[![Code style: black](https://img.shields.io/badge/mypy-checked-blue.svg)](http://mypy-lang.org/)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nRetrieves data from aws cost explore as a pandas dataframe.\n\nMain features\n- Support for input with type hints\n- Retrieving results as pandas.Dataframe\n\n## Installation\n\n```\npip install cepan\n```\n\n## Usage\n\n```python\nfrom datetime import datetime\n\nimport cepan as ce\n\ndf = ce.get_cost_and_usage(\n    time_period=ce.TimePeriod(\n        start=datetime(2020, 1, 1),\n        end=datetime(2020, 1, 2),\n    ),\n    granularity=\"DAILY\",\n    filter=ce.And(\n        [\n            ce.Dimensions(\n                \"SERVICE\",\n                [\"Amazon Simple Storage Service\", \"AmazonCloudWatch\"],    \n            ),\n            ce.Tags(\"Stack\", [\"Production\"]),\n        ]\n    ),\n    metrics=[\"BLENDED_COST\"],\n    group_by=ce.GroupBy(\n        dimensions=[\"SERVICE\", \"USAGE_TYPE\"],\n    ),\n)\nprint(df)\n```\n\nAll paginated results will be returned as a Dataframe.\n\n```\n          Time                        SERVICE  BlendedCost\n0   2020-01-01  Amazon Simple Storage Service   100.000000\n1   2020-01-01               AmazonCloudWatch    10.000000\n```\n\n### List of currently supported APIs\n\n- get_dimension_values\n- get_tags\n- get_cost_and_usage\n\n### Alias of aws service name\n\nNormally, the Cost Explorer API requires complex and long names to filter by service name.\nFor example, if you only need the value of an EC2 instance, you would need to specify `Amazon Elastic Compute Cloud - Compute`.\n\n```python\ndf = ce.get_cost_and_usage(\n    time_period=ce.TimePeriod(\n        start=datetime(2020, 1, 1),\n        end=datetime(2020, 1, 2),\n    ),\n    granularity=\"DAILY\",\n    filter=ce.Dimensions(\n        \"SERVICE\",\n        [\"Amazon Elastic Compute Cloud - Compute\"],    \n    ),\n    group_by=ce.GroupBy(\n        dimensions=[\"SERVICE\", \"USAGE_TYPE\"],\n    ),\n)\n```\n\ncepan supports aliases with short service names.\nIf you only need the value of the EC2 instance, you can specify it with  `EC2`.\n\n```python\ndf = ce.get_cost_and_usage(\n    time_period=ce.TimePeriod(\n        start=datetime(2020, 1, 1),\n        end=datetime(2020, 1, 2),\n    ),\n    granularity=\"DAILY\",\n    filter=ce.Dimensions(\n        \"SERVICE\",\n        [\"EC2\"],    \n    ),\n    group_by=ce.GroupBy(\n        dimensions=[\"SERVICE\", \"USAGE_TYPE\"],\n    ),\n)\n```\n\nCorrespondence table of aliases is shown in [service_alias.tsv](service_alias.tsv).\nYou can also run the `show_service_alias` method to get the table.\n\n```python\nprint(ce.show_service_alias())\n```\n\n## License\n\nMIT License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanga333%2Fcepan","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkanga333%2Fcepan","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkanga333%2Fcepan/lists"}