Library and API to calculate CO2 emissions for personal mobility.
maasglobal, updated
🕥
2022-12-08 10:56:27
Sustainable Mobility API
This project consists of a Python library and HTTP API for estimating the environmental impact of personal mobility.
Estimator
The estimator consists of a Python library to calculate CO2 emissions for a transport trip based on the distance and mode. The library has been published to the Python Package Index as transport-co2.
The README in the estimator folder also have examples on the library responses, for various modes of transportation.
API
The API provides an HTTP(s) endpoint to estimate the CO2 emissions for a transport trip. Internally, the API relies on the "transport-co2" estimator library.
Please go into api folder to read more about running locally or deploying as docker container or serverless function.
Roadmap
This project is intended as a proof-of-concept and to generate feedback for future development. See our project roadmap for upcoming plans and ideas.
Support or feedback
If you have ideas for this project or need assistance, please contact us via the project issue tracker.
Issues
opened on 2022-12-08 10:56:26 by dependabot[bot]
Bumps certifi from 2020.6.20 to 2022.12.7.
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/maasglobal/sustainable-mobility-api/network/alerts).
opened on 2022-12-08 09:31:46 by dependabot[bot]
Bumps certifi from 2020.4.5.1 to 2022.12.7.
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/maasglobal/sustainable-mobility-api/network/alerts).
opened on 2022-09-08 12:28:51 by dependabot[bot]
Bumps jszip from 3.2.2 to 3.10.1.
Changelog
Sourced from jszip's changelog.
v3.10.1 2022-08-02
- Add sponsorship files.
- If you appreciate the time spent maintaining JSZip then I would really appreciate your sponsorship.
- Consolidate metadata types and expose OnUpdateCallback #851 and #852
- use
const
instead var
in example from README.markdown #828
- Switch manual download link to HTTPS #839
Internals:
- Replace jshint with eslint #842
- Add performance tests #834
v3.10.0 2022-05-20
- Change setimmediate dependency to more efficient one. Fixes Stuk/jszip#617 (see #829)
- Update types of
currentFile
metadata to include null
(see #826)
v3.9.1 2022-04-06
- Fix recursive definition of
InputFileFormat
introduced in 3.9.0.
v3.9.0 2022-04-04
- Update types JSZip#loadAsync to accept a promise for data, and remove arguments from
new JSZip()
(see #752)
- Update types for
compressionOptions
to JSZipFileOptions and JSZipGeneratorOptions (see #722)
- Add types for
generateInternalStream
(see #774)
v3.8.0 2022-03-30
- Santize filenames when files are loaded with
loadAsync
, to avoid "zip slip" attacks. The original filename is available on each zip entry as unsafeOriginalName
. See the documentation. Many thanks to McCaulay Hudson for reporting.
v3.7.1 2021-08-05
- Fix build of
dist
files.
- Note: this version ensures the changes from 3.7.0 are actually included in the
dist
files. Thanks to Evan W for reporting.
v3.7.0 2021-07-23
- Fix: Use a null prototype object for this.files (see #766)
- This change might break existing code if it uses prototype methods on the
.files
property of a zip object, for example zip.files.toString()
. This approach is taken to prevent files in the zip overriding object methods that would exist on a normal object.
v3.6.0 2021-02-09
- Fix: redirect main to dist on browsers (see #742)
- Fix duplicate require DataLengthProbe, utils (see #734)
- Fix small error in read_zip.md (see #703)
v3.5.0 2020-05-31
... (truncated)
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/maasglobal/sustainable-mobility-api/network/alerts).
opened on 2022-06-23 00:07:58 by dependabot[bot]
Bumps shell-quote from 1.7.2 to 1.7.3.
Changelog
Sourced from shell-quote's changelog.
1.7.3
- Fix a security issue where the regex for windows drive letters allowed some shell meta-characters
to escape the quoting rules. (CVE-2021-42740)
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/maasglobal/sustainable-mobility-api/network/alerts).
opened on 2022-01-21 20:22:59 by dependabot[bot]
Bumps ipython from 7.14.0 to 7.16.3.
Commits

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/maasglobal/sustainable-mobility-api/network/alerts).
opened on 2021-06-02 01:15:23 by dependabot[bot]
Bumps urllib3 from 1.25.9 to 1.26.5.
Release notes
Sourced from urllib3's releases.
1.26.5
:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap
- Fixed deprecation warnings emitted in Python 3.10.
- Updated vendored
six
library to 1.16.0.
- Improved performance of URL parser when splitting the authority component.
If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors
1.26.4
:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap
- Changed behavior of the default
SSLContext
when connecting to HTTPS proxy during HTTPS requests. The default SSLContext
now sets check_hostname=True
.
If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors
1.26.3
:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap
If you or your organization rely on urllib3 consider supporting us via GitHub Sponsors
1.26.2
:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap
- Fixed an issue where
wrap_socket
and CERT_REQUIRED
wouldn't be imported properly on Python 2.7.8 and earlier (Pull #2052)
1.26.1
:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap
- Fixed an issue where two
User-Agent
headers would be sent if a User-Agent
header key is passed as bytes
(Pull #2047)
1.26.0
:warning: IMPORTANT: urllib3 v2.0 will drop support for Python 2: Read more in the v2.0 Roadmap
-
Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)
-
Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that
still wish to use TLS earlier than 1.2 without a deprecation warning
should opt-in explicitly by setting ssl_version=ssl.PROTOCOL_TLSv1_1
(Pull #2002)
Starting in urllib3 v2.0: Connections that receive a DeprecationWarning
will fail
-
Deprecated Retry
options Retry.DEFAULT_METHOD_WHITELIST
, Retry.DEFAULT_REDIRECT_HEADERS_BLACKLIST
and Retry(method_whitelist=...)
in favor of Retry.DEFAULT_ALLOWED_METHODS
,
Retry.DEFAULT_REMOVE_HEADERS_ON_REDIRECT
, and Retry(allowed_methods=...)
(Pull #2000) Starting in urllib3 v2.0: Deprecated options will be removed
... (truncated)
Changelog
Sourced from urllib3's changelog.
1.26.5 (2021-05-26)
- Fixed deprecation warnings emitted in Python 3.10.
- Updated vendored
six
library to 1.16.0.
- Improved performance of URL parser when splitting
the authority component.
1.26.4 (2021-03-15)
- Changed behavior of the default
SSLContext
when connecting to HTTPS proxy
during HTTPS requests. The default SSLContext
now sets check_hostname=True
.
1.26.3 (2021-01-26)
1.26.2 (2020-11-12)
- Fixed an issue where
wrap_socket
and CERT_REQUIRED
wouldn't
be imported properly on Python 2.7.8 and earlier (Pull #2052)
1.26.1 (2020-11-11)
- Fixed an issue where two
User-Agent
headers would be sent if a
User-Agent
header key is passed as bytes
(Pull #2047)
1.26.0 (2020-11-10)
-
NOTE: urllib3 v2.0 will drop support for Python 2.
Read more in the v2.0 Roadmap <https://urllib3.readthedocs.io/en/latest/v2-roadmap.html>
_.
-
Added support for HTTPS proxies contacting HTTPS servers (Pull #1923, Pull #1806)
-
Deprecated negotiating TLSv1 and TLSv1.1 by default. Users that
still wish to use TLS earlier than 1.2 without a deprecation warning
... (truncated)
Commits
d161647
Release 1.26.5
2d4a3fe
Improve performance of sub-authority splitting in URL
2698537
Update vendored six to 1.16.0
07bed79
Fix deprecation warnings for Python 3.10 ssl module
d725a9b
Add Python 3.10 to GitHub Actions
339ad34
Use pytest==6.2.4 on Python 3.10+
f271c9c
Apply latest Black formatting
1884878
[1.26] Properly proxy EOF on the SSLTransport test suite
a891304
Release 1.26.4
8d65ea1
Merge pull request from GHSA-5phf-pp7p-vc2r
- Additional commits viewable in compare view

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase
.
Dependabot commands and options
You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
- `@dependabot use these labels` will set the current labels as the default for future PRs for this repo and language
- `@dependabot use these reviewers` will set the current reviewers as the default for future PRs for this repo and language
- `@dependabot use these assignees` will set the current assignees as the default for future PRs for this repo and language
- `@dependabot use this milestone` will set the current milestone as the default for future PRs for this repo and language
You can disable automated security fix PRs for this repo from the [Security Alerts page](https://github.com/maasglobal/sustainable-mobility-api/network/alerts).
Releases
v0.3.0 2020-05-20 08:27:21
New
Improved
- Unit tests simplified to improve readability and maintainability
- Documentation extended to describe the CO2 estimation methodology
2020-04-09 06:55:26
New
- Add unit tests for code quality
- Add Docker file for easy deployment
- Add Serverless project for easy cloud-native deployment
- Use Black for code formatting
Improved
- Improve linting configuration for code quality
- Use correct float parsing in JavaScript
- Changes so the project can run locally
- HTTP requests always return a result (or error)
2020-01-29 10:42:24
New
- Use Connexion for HTTP API scaffolding
- Use Swagger UI to render documentation
Improved
- Reorganize project structure
- HTTP API request parameters for
occupancy
and distance_km
- API endpoint docs
- Dependency updates
- Corrected project metadata
2019-11-15 21:17:06
New
- Add Code of Conduct for community stewardship
- Add pylinting configuration
- Add Python project metadata for easier PyPI publication
- Add usage examples in README
0.1 - Eunice Newton Foote 2019-11-14 14:56:25
New
- Initial Python package for CO2 estimation based on transport mode and distance
- Add documentation with usage instructions
- Add packaging metadata for PyPI