{"id":39929,"name":"ecoinvent_interface","description":"This is an unofficial and unsupported Python library to get ecoinvent data, a life cycle inventory database for fuels, energy, chemicals and plastics, batteries, building and construction, waste, agriculture, forestry and wood, pulp and paper, metals, and transport.","url":"https://github.com/brightway-lca/ecoinvent_interface","last_synced_at":"2026-04-12T04:30:17.975Z","repository":{"id":114212711,"uuid":"556193124","full_name":"brightway-lca/ecoinvent_interface","owner":"brightway-lca","description":"Unofficial python interface to ecoinvent data","archived":false,"fork":false,"pushed_at":"2026-03-26T18:50:44.000Z","size":62554,"stargazers_count":21,"open_issues_count":10,"forks_count":7,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T01:09:57.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"duboisst/EcoInventDownLoader","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brightway-lca.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-10-23T09:25:13.000Z","updated_at":"2026-03-27T13:21:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2694ca8-5ceb-4586-b597-7cd832f220ec","html_url":"https://github.com/brightway-lca/ecoinvent_interface","commit_stats":{"total_commits":198,"total_committers":12,"mean_commits":16.5,"dds":0.5404040404040404,"last_synced_commit":"1048f12debd2e9f79a758fa8114a243d199e467c"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/brightway-lca/ecoinvent_interface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightway-lca","download_url":"https://codeload.github.com/brightway-lca/ecoinvent_interface/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31583290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"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"}},"owner":{"login":"brightway-lca","name":"Brightway LCA software framework","uuid":"26960762","kind":"organization","description":"Open source framework for Brightway framework","email":null,"website":"https://docs.brightway.dev/","location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/26960762?v=4","repositories_count":28,"last_synced_at":"2023-03-05T21:43:27.615Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/brightway-lca","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-15T23:26:10.702Z","updated_at":"2023-03-05T21:43:27.628Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightway-lca","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightway-lca/repositories"},"packages":[{"id":8328720,"name":"ecoinvent-interface","ecosystem":"pypi","description":"Unofficial client for interfacing with ecoinvent database","homepage":null,"licenses":"BSD License","normalized_licenses":["BSD-3-Clause"],"repository_url":"https://github.com/brightway-lca/ecoinvent_interface","keywords_array":[],"namespace":null,"versions_count":14,"first_release_published_at":"2023-09-24T20:19:53.000Z","latest_release_published_at":"2023-12-07T15:08:03.000Z","latest_release_number":"2.4.1","last_synced_at":"2026-04-09T03:00:35.673Z","created_at":"2023-09-24T20:34:34.798Z","updated_at":"2026-04-09T03:17:40.654Z","registry_url":"https://pypi.org/project/ecoinvent-interface/","install_command":"pip install ecoinvent-interface --index-url https://pypi.org/simple","documentation_url":"https://ecoinvent-interface.readthedocs.io/","metadata":{"funding":null,"documentation":null,"classifiers":["Intended Audience :: Science/Research","License :: OSI Approved :: BSD License","Natural Language :: English","Operating System :: OS Independent","Programming Language :: Python :: 3","Topic :: Scientific/Engineering"],"normalized_name":"ecoinvent-interface","project_status":null},"repo_metadata":{"id":114212711,"uuid":"556193124","full_name":"brightway-lca/ecoinvent_interface","owner":"brightway-lca","description":"Unofficial python interface to ecoinvent data","archived":false,"fork":false,"pushed_at":"2026-03-26T18:50:44.000Z","size":62554,"stargazers_count":21,"open_issues_count":10,"forks_count":7,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-05T01:09:57.349Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"duboisst/EcoInventDownLoader","license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brightway-lca.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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":"2022-10-23T09:25:13.000Z","updated_at":"2026-03-27T13:21:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"e2694ca8-5ceb-4586-b597-7cd832f220ec","html_url":"https://github.com/brightway-lca/ecoinvent_interface","commit_stats":{"total_commits":198,"total_committers":12,"mean_commits":16.5,"dds":0.5404040404040404,"last_synced_commit":"1048f12debd2e9f79a758fa8114a243d199e467c"},"previous_names":[],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/brightway-lca/ecoinvent_interface","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightway-lca","download_url":"https://codeload.github.com/brightway-lca/ecoinvent_interface/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31583290,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"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"},"owner_record":{"login":"brightway-lca","name":"Brightway LCA software framework","uuid":"26960762","kind":"organization","description":"Open source framework for Brightway framework","email":null,"website":"https://docs.brightway.dev/","location":null,"twitter":null,"company":null,"icon_url":"https://avatars.githubusercontent.com/u/26960762?v=4","repositories_count":28,"last_synced_at":"2023-03-05T21:43:27.615Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/brightway-lca","funding_links":[],"total_stars":null,"followers":null,"following":null,"created_at":"2022-11-15T23:26:10.702Z","updated_at":"2023-03-05T21:43:27.628Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightway-lca","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brightway-lca/repositories"},"tags":[]},"repo_metadata_updated_at":"2026-04-09T03:17:40.653Z","dependent_packages_count":2,"downloads":10975,"downloads_period":"last-month","dependent_repos_count":0,"rankings":{"downloads":null,"dependent_repos_count":68.7858185593576,"dependent_packages_count":7.360830632529823,"stargazers_count":27.906307811425656,"forks_count":29.966211224178185,"docker_downloads_count":null,"average":33.504792056872816},"purl":"pkg:pypi/ecoinvent-interface","advisories":[],"docker_usage_url":"https://docker.ecosyste.ms/usage/pypi/ecoinvent-interface","docker_dependents_count":null,"docker_downloads_count":null,"usage_url":"https://repos.ecosyste.ms/usage/pypi/ecoinvent-interface","dependent_repositories_url":"https://repos.ecosyste.ms/api/v1/usage/pypi/ecoinvent-interface/dependencies","status":null,"funding_links":[],"critical":null,"issue_metadata":{"last_synced_at":"2026-03-27T21:01:03.245Z","issues_count":21,"pull_requests_count":40,"avg_time_to_close_issue":8196866.285714285,"avg_time_to_close_pull_request":1876484.6785714286,"issues_closed_count":14,"pull_requests_closed_count":28,"pull_request_authors_count":7,"issue_authors_count":9,"avg_comments_per_issue":1.0952380952380951,"avg_comments_per_pull_request":0.55,"merged_pull_requests_count":25,"bot_issues_count":1,"bot_pull_requests_count":24,"past_year_issues_count":1,"past_year_pull_requests_count":6,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":1,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":0.0,"past_year_avg_comments_per_pull_request":0.0,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":6,"past_year_merged_pull_requests_count":0,"issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/issues","maintainers":[{"login":"cmutel","count":15,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/cmutel"},{"login":"jsvgoncalves","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/jsvgoncalves"}],"active_maintainers":[]},"versions_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/ecoinvent-interface/versions","version_numbers_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/ecoinvent-interface/version_numbers","dependent_packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/ecoinvent-interface/dependent_packages","related_packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/ecoinvent-interface/related_packages","codemeta_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages/ecoinvent-interface/codemeta","maintainers":[{"uuid":"cmutel","login":"cmutel","name":null,"email":null,"url":null,"packages_count":77,"html_url":"https://pypi.org/user/cmutel/","role":null,"created_at":"2023-09-24T20:34:36.648Z","updated_at":"2023-09-24T20:34:36.648Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/maintainers/cmutel/packages"}],"registry":{"name":"pypi.org","url":"https://pypi.org","ecosystem":"pypi","default":true,"packages_count":837461,"maintainers_count":357672,"namespaces_count":0,"keywords_count":271316,"github":"pypi","metadata":{"funded_packages_count":53172},"icon_url":"https://github.com/pypi.png","created_at":"2022-04-04T15:19:23.364Z","updated_at":"2026-04-09T05:08:03.587Z","packages_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/packages","maintainers_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/maintainers","namespaces_url":"https://packages.ecosyste.ms/api/v1/registries/pypi.org/namespaces"}}],"commits":{"id":1350555,"full_name":"brightway-lca/ecoinvent_interface","default_branch":"main","total_commits":200,"total_committers":13,"total_bot_commits":11,"total_bot_committers":1,"mean_commits":15.384615384615385,"dds":0.5449999999999999,"past_year_total_commits":2,"past_year_total_committers":2,"past_year_total_bot_commits":1,"past_year_total_bot_committers":1,"past_year_mean_commits":1.0,"past_year_dds":0.5,"last_synced_at":"2026-04-09T03:01:51.374Z","last_synced_commit":"f9b208d9c89bd21aee8931f3405814b1fae4f160","created_at":"2023-09-12T10:50:28.482Z","updated_at":"2026-04-09T03:01:06.449Z","committers":[{"name":"Chris Mutel","email":"cmutel@gmail.com","login":"cmutel","count":91},{"name":"haasad","email":"haasad@student.ethz.ch","login":"haasad","count":78},{"name":"renovate[bot]","email":"29139614+renovate[bot]","login":"renovate[bot]","count":11},{"name":"Stephane Dubois","email":"stephane.dubois@sanofi.com","login":"stephane-dubois","count":5},{"name":"João Gonçalves","email":"jsvgoncalves@gmail.com","login":"jsvgoncalves","count":4},{"name":"tngTUDOR","email":"tngTUDOR","login":"tngTUDOR","count":2},{"name":"James Joyce","email":"pjamesjoyce@gmail.com","login":"pjamesjoyce","count":2},{"name":"Ernesto Rocha","email":"ernesto.ribeirorocha@sanofi.com","login":"ernestorocha","count":2},{"name":"Raphael Jolivet","email":"raphael.jolivet@mines-paristech.fr","login":"raphaeljolivet","count":1},{"name":"Haitham Ghaida","email":"haitham.ghaida@protonmail.com","login":"Haitham-ghaida","count":1},{"name":"Dean Malmgren","email":"dean@planetfwd.com","login":"deanmalmgren","count":1},{"name":"mija.frossard","email":"Joeystarr9","login":null,"count":1},{"name":"adrian","email":"adrian.haas@ifu.baug.ethz.ch","login":null,"count":1}],"past_year_committers":[{"name":"renovate[bot]","email":"29139614+renovate[bot]","login":"renovate[bot]","count":1},{"name":"Dean Malmgren","email":"dean@planetfwd.com","login":"deanmalmgren","count":1}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:23.197Z","repositories_count":6212566,"commits_count":905827120,"contributors_count":34964909,"owners_count":1143533,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"brightway-lca/ecoinvent_interface","html_url":"https://github.com/brightway-lca/ecoinvent_interface","last_synced_at":"2026-04-09T03:00:18.950Z","status":"active","issues_count":21,"pull_requests_count":40,"avg_time_to_close_issue":8196866.285714285,"avg_time_to_close_pull_request":1876484.6785714286,"issues_closed_count":14,"pull_requests_closed_count":28,"pull_request_authors_count":7,"issue_authors_count":9,"avg_comments_per_issue":1.0952380952380951,"avg_comments_per_pull_request":0.55,"merged_pull_requests_count":25,"bot_issues_count":1,"bot_pull_requests_count":24,"past_year_issues_count":1,"past_year_pull_requests_count":6,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":null,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":0,"past_year_pull_request_authors_count":1,"past_year_issue_authors_count":1,"past_year_avg_comments_per_issue":0.0,"past_year_avg_comments_per_pull_request":0.0,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":6,"past_year_merged_pull_requests_count":0,"created_at":"2023-09-12T10:50:35.416Z","updated_at":"2026-04-09T03:00:18.950Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/brightway-lca%2Fecoinvent_interface/issues","issue_labels_count":{"enhancement":4,"good first issue":2,"thetruthisouthere":1},"pull_request_labels_count":{},"issue_author_associations_count":{"MEMBER":12,"NONE":5,"CONTRIBUTOR":4},"pull_request_author_associations_count":{"CONTRIBUTOR":29,"MEMBER":6,"NONE":5},"issue_authors":{"cmutel":12,"tngTUDOR":2,"FWJK1":1,"asergios":1,"lvandepaer":1,"raphaeljolivet":1,"renovate[bot]":1,"Shhemant":1,"Haitham-ghaida":1},"pull_request_authors":{"renovate[bot]":24,"tngTUDOR":6,"jsvgoncalves":3,"cmutel":3,"deanmalmgren":2,"Haitham-ghaida":1,"raphaeljolivet":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-04-09T00:00:10.509Z","repositories_count":14198409,"issues_count":34666122,"pull_requests_count":113306357,"authors_count":11232021,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{},"past_year_pull_request_labels_count":{},"past_year_issue_author_associations_count":{"NONE":1},"past_year_pull_request_author_associations_count":{"CONTRIBUTOR":6},"past_year_issue_authors":{"lvandepaer":1},"past_year_pull_request_authors":{"renovate[bot]":6},"maintainers":[{"login":"cmutel","count":15,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/cmutel"},{"login":"jsvgoncalves","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/jsvgoncalves"}],"active_maintainers":[]},"events":{"total":{"DeleteEvent":5,"PullRequestEvent":14,"ForkEvent":3,"IssuesEvent":8,"WatchEvent":6,"IssueCommentEvent":20,"PushEvent":19,"PullRequestReviewEvent":5,"PullRequestReviewCommentEvent":6,"CreateEvent":8},"last_year":{"DeleteEvent":2,"PullRequestEvent":4,"ForkEvent":1,"IssuesEvent":2,"WatchEvent":1,"IssueCommentEvent":1,"PushEvent":7,"CreateEvent":1}},"keywords":[],"dependencies":[],"score":15.302585111056517,"created_at":"2023-09-12T07:49:36.335Z","updated_at":"2026-04-12T04:30:17.982Z","avatar_url":"https://github.com/brightway-lca.png","language":"Python","category":"Industrial Ecology","sub_category":"Life Cycle Assessment","monthly_downloads":10975,"total_dependent_repos":0,"total_dependent_packages":2,"readme":"# ecoinvent_interface\n\n[![PyPI](https://img.shields.io/pypi/v/ecoinvent_interface.svg)][pypi status]\n[![Status](https://img.shields.io/pypi/status/ecoinvent_interface.svg)][pypi status]\n[![Python Version](https://img.shields.io/pypi/pyversions/ecoinvent_interface)][pypi status]\n\n[pypi status]: https://pypi.org/project/ecoinvent-interface/\n[tests]: https://github.com/brightway-lca/ecoinvent_interface/actions?workflow=Tests\n\nThis is an **unofficial and unsupported** Python library to get ecoinvent data.\n\n\u003e [!WARNING]  \n\u003e 😯 Versions older than 3.0 of `ecoinvent-interface` will stop working as of February 2025.\n\u003e Please update as soon as possible ❗\n\n# Quickstart\n\n```python\nfrom ecoinvent_interface import Settings, EcoinventRelease, ReleaseType\nmy_settings = Settings(username=\"John.Doe\", password=\"example\")\nrelease = EcoinventRelease(my_settings)\nrelease.list_versions()\n\u003e\u003e\u003e ['3.9.1', '3.9', '3.8', '3.7.1', ...]\nrelease.list_system_models('3.7.1')\n\u003e\u003e\u003e ['cutoff', 'consequential', 'apos']\nrelease.get_release(version='3.7.1', system_model='apos', release_type=ReleaseType.ecospold)\n\u003e\u003e\u003e PosixPath('/Users/JohnDoe/Library/Application Support/'\n              'EcoinventRelease/cache/ecoinvent 3.7.1_apos_ecoSpold02')\n```\n\nThe ecospold files are downloaded and extracted automatically.\n\n# Usage\n\n## Authentication via `Settings` object\n\nAuthentication is done via the `Settings` object. Accessing ecoinvent requires supplying a username and password.\n\nNote that you **must accept** the ecoinvent license and personal identifying information agreement on the website before using your user account via this library.\n\nYou can provide credentials in three ways:\n\n* Manually, via arguments to the `Settings` object instantiation:\n\n```python\nfrom ecoinvent_interface import Settings\nmy_settings = Settings(username=\"bob\", password=\"example\")\n```\n\n* Via the `EI_PASSWORD` and `EI_USERNAME` environment variables\n\n```bash\nexport EI_USERNAME=bob\nexport EI_PASSWORD=example\n```\n\nIf your environment variable values have special characters, using single quotes should work, e.g. `export EI_PASSWORD='compl\\!cat$d'`.\n\nFollowed by:\n\n```python\nfrom ecoinvent_interface import Settings\n# Environment variables read automatically\nmy_settings = Settings()\n```\n\n* Or with the use of a [pydantic_settings secrets directory](https://docs.pydantic.dev/latest/usage/pydantic_settings/#secrets). The easiest way to create the correct files is via the utility function `permanent_setting`:\n\n```python\nfrom ecoinvent_interface import Settings, permanent_setting\npermanent_setting(\"username\", \"bob\")\npermanent_setting(\"password\", \"example\")\n# Secrets files read automatically\nmy_settings = Settings()\n```\n\nSecrets files are stored in `ecoinvent_interface.storage.secrets_dir`.\n\nFor each value, manually set values always *take precedence* over environment variables, which in turn *take precendence* over secrets files.\n\nA reasonable guide for choosing between the three is to use secrets on your private, local machine, and to use environment variables on servers or containers.\n\n## `EcoinventRelease` interface\n\nTo interact with the ecoinvent website, instantiate `EcoinventRelease`.\n\n```python\nfrom ecoinvent_interface import EcoinventRelease, Settings, ReleaseType\nmy_settings = Settings()\nei = EcoinventRelease(my_settings)\n```\n\n### Database releases\n\nTo get a database release, we need to make three selections. First, the version:\n\n```python\nei.list_versions()\n\u003e\u003e\u003e ['3.9.1', '3.9', '3.8', '3.7.1', ...]\n```\n\nSecond, the system model:\n\n```python\nei.list_system_models('3.7.1')\n\u003e\u003e\u003e ['cutoff', 'consequential', 'apos']\n```\n\nThe ecoinvent API uses a short and long form of the system model names; you can get the longer names by passing `translate=False`. You can use either form in all `EcoinventRelease` methods.\n\n```python\nei.list_system_models('3.7.1', translate=False)\n\u003e\u003e\u003e [\n  'Allocation cut-off by classification',\n  'Substitution, consequential, long-term',\n  'Allocation at the Point of Substitution'\n]\n```\n\nFinally, the type of release. These are stored in an `Enum`. There are six release types; if you just want the database to do calculations choose the `ecospold` type.\n\n* `ReleaseType.ecospold`: The single-output unit process files in ecospold2 XML format\n* `ReleaseType.matrix`: The so-called \"universal matrix export\"\n* `ReleaseType.lci`: LCI data in ecospold2 XML format\n* `ReleaseType.lcia`: LCIA data in ecospold2 XML format\n* `ReleaseType.cumulative_lci`: LCI data in Excel\n* `ReleaseType.cumulative_lcia`: LCIA data in Excel\n\nSee the ecoinvent website for more information on what these values mean.\n\nOnce we have made a selection for all three choices, we can get the release files. They are saved to a cache directory and extracted by default.\n\n```python\nei.get_release(version='3.7.1', system_model='apos', release_type=ReleaseType.matrix)\n\u003e\u003e\u003e PosixPath('/Users/JohnDoe/Library/Application Support/'\n              'EcoinventRelease/cache/universal_matrix_export_3.7.1_apos')\n```\n\nThe default cache uses [platformdirs](https://platformdirs.readthedocs.io/en/latest/), and the directory location is OS-dependent. You can use a custom cache directory with by specifying `output_path` when creating the `Settings` class instance.\n\nYou can work with the cache when offline:\n\n```python\ncs = CachedStorage()\nlist(cs.catalogue)\n\u003e\u003e\u003e ['ecoinvent 3.7.1_LCIA_implementation.7z']\ncs.catalogue['ecoinvent 3.7.1_LCIA_implementation.7z']\n\u003e\u003e\u003e {\n  'path': '/Users/\u003cyour username\u003e/Library/Application Support/'\n          'EcoinventRelease/cache/ecoinvent 3.7.1_LCIA_implementation',\n  'extracted': True,\n  'created': '2023-09-03T20:23:57.186519'\n}\n```\n\n### `EcoinventRelease` *extra* files\n\nThere are two other kinds of files available: *reports*, and what we call *extra* files. Let's see the *extra* files for version `'3.7.1'`:\n\n```python\nei.list_extra_files('3.7.1')\n\u003e\u003e\u003e  {'ecoinvent 3.7.1_LCIA_implementation.7z': {\n    'uuid': ...,\n    'size': ...,\n    'modified': datetime.datetime(2023, 4, 25, 0, 0)\n  },\n  ...\n}\n```\n\nThis returns a dictionary of filenames and metadata. We can download the `ecoinvent 3.7.1_LCIA_implementation.7z` file; by default it will automatically be extracted.\n\n\n```python\nei.get_extra(version='3.7.1', filename='ecoinvent 3.7.1_LCIA_implementation.7z')\n\u003e\u003e\u003e PosixPath('/Users/\u003cyour username\u003e/Library/Application Support'\n              '/EcoinventRelease/cache/ecoinvent 3.7.1_LCIA_implementation')\n```\n\n### `EcoinventRelease` *reports*\n\nReports require a login but not a version number:\n\n```python\nei.list_report_files()\n\u003e\u003e\u003e {\n  'Allocation, cut-off, EN15804_documentation.pdf': {\n    'uuid': ...,\n    'size': ...,\n    'modified': datetime.datetime(2021, 10, 1, 0, 0),\n    'description': ('This document provides a documentation on the calculation '\n                    'of the indicators in the “Allocation, cut-off, EN15804” '\n                    'system model.')\n  }\n}\n```\n\nDownloading follows the same pattern as before:\n\n```python\nei.get_report('Allocation, cut-off, EN15804_documentation.pdf')\n\u003e\u003e\u003e PosixPath('/Users/\u003cyour username\u003e/Library/Application Support/EcoinventRelease/cache/Allocation, cut-off, EN15804_documentation.pdf')\n```\n\nZip and 7z files are extracted by default.\n\n## `EcoinventProcess` interface\n\nThis class gets data and reports for specific processes. It first needs to know what release version and system model to work with:\n\n```python\nfrom ecoinvent_interface import EcoinventProcess, Settings\nmy_settings = Settings()\nep = EcoinventProcess(my_settings)\nep.set_release(version=\"3.7.1\", system_model=\"apos\")\n```\n\n### Finding a dataset id\n\nThe ecoinvent API uses integer indices, and these values aren't found in the release values. We have cached these indices for versions `3.5`, `3.6`, `3.7.1`, `3.8`, `3.9.1`, and `3.10`. If you already know the integer index, you can use that:\n\n```python\nep.select_process(dataset_id=\"1\")\n```\n\nYou can also use the filename, if you know it:\n\n```python\nF = \"b0eb27dd-b87f-4ae9-9f69-57d811443a30_66c93e71-f32b-4591-901c-55395db5c132.spold\"\nep.select_process(filename=F)\nep.dataset_id\n\u003e\u003e\u003e \"1\"\n```\n\nFinally, you can pass in a set of `attributes`. You should use the name, reference product, and/or location to uniquely identify a process. You don't need to give all attributes, but will get an error if the attributes aren't specific enough.\n\n`attributes` is a dictionary, and can take the following keys:\n\n* `name` or `activity_name`\n* `reference product` or `reference_product`\n* `location` or `geography`\n\nThe system will adapt the names as needed to find a match.\n\n```python\nep.select_process(\n    attributes={\n        \"name\": \"rye seed production, Swiss integrated production, for sowing\",\n        \"location\": \"CH\",\n        \"reference product\": \"rye seed, Swiss integrated production, for sowing\",\n    }\n)\nep.dataset_id\n\u003e\u003e\u003e \"40\"\n```\n\nDataset id values are the same across all system models and versions; however, not every system model or version will have all datasets.\n\n### Basic process information\n\nOnce you have selected the process, you can get basic information about that process:\n\n```python\nep.get_basic_info()\n\u003e\u003e\u003e {\n  'index': 1,\n  'version': '3.7.1',\n  'system_model': 'apos',\n  'activity_name': 'electricity production, nuclear, boiling water reactor',\n  'geography': 'FI',\n  'reference_product': 'electricity, high voltage',\n  'has_access': True\n}\n ```\n\nYou can also call `ep.get_documentation()` to get a representation of the ecospold2 XML file in Python.\n\n### Process documents\n\nYou can use `ep.get_file` with one of the following file types to download process files:\n\n* ProcessFileType.upr: Unit Process ecospold XML\n* ProcessFileType.lci: Life Cycle Inventory ecospold XML\n* ProcessFileType.lcia: Life Cycle Impact Assessment ecospold XML\n* ProcessFileType.pdf: PDF Dataset Report\n* ProcessFileType.undefined: Undefined (unlinked and multi-output) Dataset PDF Report\n\nFor example, running the following would download the life cycle impact assessment ecospold XML file to the current working directory. The `get_file` method requires specifying the `directory`.\n\n```python\nfrom ecoinvent_interface import ProcessFileType\nfrom pathlib import Path\nep.get_file(file_type=ProcessFileType.lcia, directory=Path.cwd())\n```\n\nHere is a complete example for downloading a PDF dataset report:\n\n```python\nfrom ecoinvent_interface import EcoinventProcess, Settings, ProcessFileType\nfrom pathlib import Path\nmy_settings = Settings()\nep = EcoinventProcess(my_settings)\nep.set_release(version=\"3.7.1\", system_model=\"apos\")\nep.select_process(\n    attributes={\n        \"name\": \"rye seed production, Swiss integrated production, for sowing\",\n        \"location\": \"CH\",\n        \"reference product\": \"rye seed, Swiss integrated production, for sowing\",\n    }\n)\nep.get_file(file_type=ProcessFileType.pdf, directory=Path.cwd())\n```\n\n# Relationship to EIDL\n\nThis library initially started as a fork of [EIDL](https://github.com/haasad/EcoInventDownLoader), the ecoinvent downloader. As of version 2.0, it has been completely rewritten. Currently only the authentication code comes from `EIDL`.\n\nDifferences with `EIDL`:\n\n* Designed to be a lower-level infrastructure library. All user and web browser interaction was removed.\n* Username and password can be specified using [pydantic_settings](https://docs.pydantic.dev/latest/usage/pydantic_settings/).\n* Can download all release files, plus reports and \"extra\" files.\n* Will autocorrect filenames when possible for ecoinvent inconsistencies.\n* Can download data on inventory processes.\n* Can find inventory processes using their filename or attributes.\n* Uses a more robust caching and cache validation strategy.\n* More reasonable token refresh strategy.\n* No HTML parsing or filename string hacks.\n* Streaming downloads.\n* Descriptive logging and error messages.\n* No shortcuts for Brightway or other LCA software.\n* Custom library headers are set to allow users of this library to be identified. No user information is transmitted.\n* Comprehensive tests.\n\n# Contributing\n\nContributions are very welcome, but please note the following:\n\n* This library consumes and unpublished an under development API\n* Extensions of the current API to get process LCI or LCIA data or LCIA scores won't be included\n* Brightway-specific code won't be included\n\nTo learn more, see the [Contributor Guide].\n\n# License\n\nDistributed under the terms of the [MIT license][license],\n_ecoinvent_interface_ is free and open source software.\n\n# Issues\n\nIf you encounter any problems,\nplease [file an issue] along with a detailed description.\n\n\u003c!-- github-only --\u003e\n\n[file an issue]: https://github.com/brightway-lca/ecoinvent_interface/issues\n[command-line reference]: https://ecoinvent_interface.readthedocs.io/en/latest/usage.html\n[license]: https://github.com/brightway-lca/ecoinvent_interface/blob/main/LICENSE\n[contributor guide]: https://github.com/brightway-lca/ecoinvent_interface/blob/main/CONTRIBUTING.md\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":["brightway2","lca","ecoinvent","life-cycle-assessment","lifecycleassessment","pyside2","pyside6","bw2","brightway","ontologies"],"project_url":"https://ost.ecosyste.ms/api/v1/projects/39929","html_url":"https://ost.ecosyste.ms/projects/39929"}