boaviztapi

πŸ›  Giving access to BOAVIZTA reference data and methodologies trough a RESTful API

https://github.com/Boavizta/boaviztapi

Science Score: 26.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • β—‹
    CITATION.cff file
  • βœ“
    codemeta.json file
    Found codemeta.json file
  • βœ“
    .zenodo.json file
    Found .zenodo.json file
  • β—‹
    DOI references
  • β—‹
    Academic publication links
  • β—‹
    Committers with academic emails
  • β—‹
    Institutional organization owner
  • β—‹
    JOSS paper metadata
  • β—‹
    Scientific vocabulary similarity
    Low similarity (13.1%) to scientific vocabulary

Keywords

openapi

Keywords from Contributors

sustainability virtual-machine carbon-footprint energy-consumption greensoftware greenops grafana-dashboard emissions-co2 ec2 electricity-consumption
Last synced: 6 months ago · JSON representation

Repository

πŸ›  Giving access to BOAVIZTA reference data and methodologies trough a RESTful API

Basic Info
  • Host: GitHub
  • Owner: Boavizta
  • License: agpl-3.0
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 7.18 MB
Statistics
  • Stars: 87
  • Watchers: 13
  • Forks: 29
  • Open Issues: 49
  • Releases: 27
Topics
openapi
Created over 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Contributing License

README.md

BoaviztAPI

An API to access Boavizta's methodologies and data


See the documentation for API usage and methodology.

Python tests

πŸ’¬ Join us on our public chat

:dart: Objective

Boavizta aims to enhance the assessment of environmental impacts induced by ICTs in organizations by providing widespread access to our work in an automated and efficient manner.

Boavizta integrates various data and methodologies, which are combined and made accessible through this API.

Transparency and the popularization of scientific knowledge are of utmost importance in this project, and key aspects include open-sourcing the code, versioning the impact factors, and thoroughly documenting the project.

In the interest of transparency and scientific popularization, the opening of the code, the versioning of the impact factors and the documentation of the project are critical points.

The system follows a bottom-up approach in its development, organized into layers. The initial layer focuses on equipment. The second layer focues on the impacts of digital services (e.g. cloud instances) or systems. However, assessing the overall global impact of ICT is currently beyond the project's scope.

:fast_forward: Test it yourself (no installation)

Run a local instance

:whale: Run API using docker

bash $ docker run -p 5000:5000 ghcr.io/boavizta/boaviztapi:latest

Access the API at http://localhost:5000.

Install using pip package

bash $ pip3 install boaviztapi

Run the server locally with:

bash $ uvicorn boaviztapi.main:app --host=localhost --port 5000

:computer: Development

Prerequisite

Python 3 mandatory, Python >=3.10 and Poetry strongly recommended.

Setup poetry

Install poetry (see the install instructions for more details):

bash $ pip3 install poetry

Install dependencies and create a Python virtual environment:

bash $ make install $ poetry shell

Launch a development server

Once in the poetry environment

The development server uses uvicorn and FastAPI. You can launch the development server with the uvicorn CLI.

bash $ uvicorn boaviztapi.main:app --host=localhost --port 5000

You can run the tests with pytest via make test.

Create your own docker image and run it

Build application package:

sh make install

Build Docker image:

```sh

using the makefile (recommended)

make docker-build

manual build (requires to set version)

docker build --build-arg VERSION=poetry version -s . ```

Run Docker image:

sh docker run -p 5000:5000/tcp boavizta/boaviztapi:`poetry version -s`

Alternative (if you don't have Python or Poetry)

```sh make docker-build-development

make docker-run-development ```

Deploy to AWS as serverless application

⚠ This is currently not working , see Deployment as serverless application does not work · Issue #153 · Boavizta/boaviztapi

Api can be self hosted to your own AWS account using the serverless framework.

```sh

Install the serverless framework and plugins

npm install -g serverless npm i

Authenticate

export AWS_PROFILE=your-own-profile

Deploy to dev

serverless deploy ```

Fisrt packaging/deployment may takes a several minutes

OpenAPI specification (Swagger)

Once API server is launched API swagger is available at httsp://localhost:5000/docs.

:woman: Contributing

See contributing.md.

You can build a source distribution (installable with pip) with make build.

:one: Versioning

We use Semantic Versioning 2.0.0

| Type | Description | Command | | :--- | :----: | ---: | | MAJOR | version when you make incompatible API changes | make major | | MINOR | version when you add functionality in a backwards compatible manner | make minor | | PATCH | version when you make backwards compatible bug fixes | make patch |

:two: Publishing

You can run:

shell API_TOKEN=<your_token> make distribute

:scroll: License

GNU Affero General Public License v3.0

Owner

  • Name: Boavizta
  • Login: Boavizta
  • Kind: organization
  • Email: contact@boavizta.org

GitHub Events

Total
  • Create event: 27
  • Release event: 10
  • Issues event: 48
  • Watch event: 10
  • Delete event: 10
  • Issue comment event: 120
  • Push event: 101
  • Gollum event: 3
  • Pull request review event: 5
  • Pull request review comment event: 1
  • Pull request event: 93
  • Fork event: 5
Last Year
  • Create event: 27
  • Release event: 10
  • Issues event: 48
  • Watch event: 10
  • Delete event: 10
  • Issue comment event: 120
  • Push event: 101
  • Gollum event: 3
  • Pull request review event: 5
  • Pull request review comment event: 1
  • Pull request event: 93
  • Fork event: 5

Committers

Last synced: 6 months ago

All Time
  • Total Commits: 1,074
  • Total Committers: 40
  • Avg Commits per committer: 26.85
  • Development Distribution Score (DDS): 0.781
Past Year
  • Commits: 110
  • Committers: 13
  • Avg Commits per committer: 8.462
  • Development Distribution Score (DDS): 0.627
Top Committers
Name Email Commits
da-ekchajzer d****r@L****k 235
David Ekchajzer d****r@h****g 190
Samuel Rince s@r****e 149
da-ekchajzer d****r@g****m 105
Benoit Petit b****t@h****g 54
Benoit Petit b****t@n****e 44
olivier de Meringo d****o@g****m 40
Samuel s****l@a****e 30
Bruno Thomas b****o@b****r 27
Benjamin Dromard b****d@g****m 23
David Ekchajzer d****r@i****m 20
Jacob Valdemar Andreasen j****n@l****p 20
Airloren r****n@c****o 20
dependabot[bot] 4****]@u****m 18
Simon Shillaker m****l@s****m 12
benjaminlebigot b****t@g****m 12
Julien Nioche j****n@d****m 9
Christophe SaugΓ© c****e@g****m 8
github-actions[bot] 4****]@u****m 6
Jonathan Perron j****n@l****m 5
Simon Shillaker s****r@s****m 5
Valentin Chaud v****d@o****m 5
Luke Kuzmish l****h@g****m 4
Thibault Simon t****n@o****m 4
ju3ouz4n j****n@p****e 4
Olivier D o****i@g****m 4
Samuel RincΓ© 3****e@u****m 3
Simon Shillaker 5****r@u****m 3
DE MERINGO Olivier o****o@c****m 2
Seb Solere s****e@u****m 2
and 10 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 152
  • Total pull requests: 202
  • Average time to close issues: 4 months
  • Average time to close pull requests: 9 days
  • Total issue authors: 29
  • Total pull request authors: 23
  • Average comments per issue: 2.55
  • Average comments per pull request: 1.01
  • Merged pull requests: 159
  • Bot issues: 0
  • Bot pull requests: 22
Past Year
  • Issues: 35
  • Pull requests: 99
  • Average time to close issues: 10 days
  • Average time to close pull requests: 8 days
  • Issue authors: 15
  • Pull request authors: 11
  • Average comments per issue: 1.71
  • Average comments per pull request: 0.89
  • Merged pull requests: 70
  • Bot issues: 0
  • Bot pull requests: 22
Top Authors
Issue Authors
  • da-ekchajzer (52)
  • demeringo (49)
  • bpetit (8)
  • VincentVillet (5)
  • davidkopp (4)
  • JacobValdemar (3)
  • Shillaker (3)
  • PierreRust (3)
  • jnioche (3)
  • samuelrince (3)
  • jonperron (3)
  • PierreRustOrange (2)
  • mrchrisadams (2)
  • damienfernandes (2)
  • ValentinRegnault (2)
Pull Request Authors
  • da-ekchajzer (76)
  • dependabot[bot] (32)
  • demeringo (19)
  • Shillaker (18)
  • ju3ouz4n (16)
  • jonperron (12)
  • csauge (9)
  • tibosmn (7)
  • samuelrince (6)
  • AirLoren (5)
  • JacobValdemar (4)
  • jnioche (4)
  • bpetit (4)
  • valentinchaud (3)
  • JX5671 (2)
Top Labels
Issue Labels
bug (48) enhancement (30) help wanted (22) documentation (20) good first issue (20) functional (15) DATA (14) methodology (13) technical (6) dependencies (2) python (2) security (2) question (1) use case (1)
Pull Request Labels
dependencies (32) python (26) javascript (6) DATA (5) documentation (3) enhancement (2) bug (1)

Packages

  • Total packages: 3
  • Total downloads:
    • pypi 228 last-month
  • Total dependent packages: 0
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 87
  • Total maintainers: 1
proxy.golang.org: github.com/boavizta/boaviztapi
  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
proxy.golang.org: github.com/Boavizta/boaviztapi
  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 5.4%
Average: 5.6%
Dependent repos count: 5.8%
Last synced: 6 months ago
pypi.org: boaviztapi

An API to access Boavizta's methodologies and footprint reference data

  • Versions: 29
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 228 Last month
Rankings
Dependent packages count: 10.0%
Downloads: 26.3%
Average: 34.6%
Dependent repos count: 67.6%
Maintainers (1)
Last synced: 6 months ago

Dependencies

package-lock.json npm
  • 2-thenable 1.0.0
  • @iarna/toml 2.2.5
  • ansi-regex 5.0.1
  • ansi-styles 4.3.0
  • appdirectory 0.1.0
  • at-least-node 1.0.0
  • balanced-match 1.0.2
  • bluebird 3.7.2
  • brace-expansion 1.1.11
  • camelcase 5.3.1
  • child-process-ext 2.1.1
  • cliui 6.0.0
  • color-convert 2.0.1
  • color-name 1.1.4
  • concat-map 0.0.1
  • core-util-is 1.0.3
  • cross-spawn 6.0.5
  • d 1.0.1
  • decamelize 1.2.0
  • duration 0.2.2
  • emoji-regex 8.0.0
  • es5-ext 0.10.61
  • es6-iterator 2.0.3
  • es6-symbol 3.1.3
  • event-emitter 0.3.5
  • ext 1.6.0
  • find-up 4.1.0
  • fs-extra 9.1.0
  • fs.realpath 1.0.0
  • get-caller-file 2.0.5
  • glob 7.2.3
  • glob-all 3.3.0
  • graceful-fs 4.2.10
  • immediate 3.0.6
  • inflight 1.0.6
  • inherits 2.0.4
  • is-docker 2.2.1
  • is-fullwidth-code-point 3.0.0
  • is-plain-object 2.0.4
  • is-primitive 3.0.1
  • is-stream 1.1.0
  • is-wsl 2.2.0
  • isarray 1.0.0
  • isexe 2.0.0
  • isobject 3.0.1
  • jsonfile 6.1.0
  • jszip 3.10.0
  • lie 3.3.0
  • locate-path 5.0.0
  • lodash.get 4.4.2
  • lodash.uniqby 4.7.0
  • lodash.values 4.3.0
  • log 6.3.1
  • minimatch 3.1.2
  • next-tick 1.1.0
  • nice-try 1.0.5
  • once 1.4.0
  • p-limit 2.3.0
  • p-locate 4.1.0
  • p-try 2.2.0
  • pako 1.0.11
  • path-exists 4.0.0
  • path-is-absolute 1.0.1
  • path-key 2.0.1
  • process-nextick-args 2.0.1
  • readable-stream 2.3.7
  • readable-stream 3.6.0
  • require-directory 2.1.1
  • require-main-filename 2.0.0
  • rimraf 3.0.2
  • safe-buffer 5.1.2
  • safe-buffer 5.2.1
  • semver 5.7.1
  • serverless-python-requirements 5.4.0
  • set-blocking 2.0.0
  • set-value 4.1.0
  • setimmediate 1.0.5
  • sha256-file 1.0.0
  • shebang-command 1.2.0
  • shebang-regex 1.0.0
  • shell-quote 1.7.3
  • split2 3.2.2
  • sprintf-kit 2.0.1
  • stream-promise 3.2.0
  • string-width 4.2.3
  • string_decoder 1.1.1
  • string_decoder 1.3.0
  • strip-ansi 6.0.1
  • type 2.6.0
  • type 1.2.0
  • uni-global 1.0.0
  • universalify 2.0.0
  • util-deprecate 1.0.2
  • which 1.3.1
  • which-module 2.0.0
  • wrap-ansi 6.2.0
  • wrappy 1.0.2
  • y18n 4.0.3
  • yargs 15.4.1
  • yargs-parser 18.1.3
package.json npm
  • serverless-python-requirements ^5.0.1
.github/workflows/build_client.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
.github/workflows/github_page_deploy.yml actions
  • actions/checkout v2 composite
  • ad-m/github-push-action master composite
  • mhausenblas/mkdocs-deploy-gh-pages master composite
.github/workflows/release.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
  • docker/login-action v1 composite
.github/workflows/test.yml actions
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
Dockerfile docker
  • gcr.io/distroless/python3 latest build
  • python 3.9-slim build
docs/Dockerfile docker
  • python 3.7-slim-buster build
docs/requirements.txt pypi
  • markdown ==3.2.1
  • mkdocs *
  • mkdocs-material ==8.5.6
  • mkdocs-render-swagger-plugin *
requirements.txt pypi
  • CacheControl ==0.12.11
  • Jinja2 ==3.1.2
  • Markdown ==3.4.1
  • MarkupSafe ==2.1.1
  • PyYAML ==6.0
  • Pygments ==2.13.0
  • aiofile ==3.8.1
  • anyio ==3.6.2
  • atomicwrites ==1.4.1
  • attrs ==22.1.0
  • bleach ==5.0.1
  • bump2version ==1.0.1
  • caio ==0.9.11
  • certifi ==2022.9.24
  • cffi ==1.15.1
  • charset-normalizer ==2.1.1
  • click ==8.1.3
  • colorama ==0.4.6
  • commonmark ==0.9.1
  • cryptography ==38.0.4
  • cyclonedx-python-lib ==3.1.1
  • docutils ==0.19
  • exceptiongroup ==1.0.4
  • fastapi ==0.88.0
  • ghp-import ==2.1.0
  • h11 ==0.14.0
  • html5lib ==1.1
  • httpcore ==0.16.2
  • httpx ==0.23.1
  • idna ==3.4
  • importlib-metadata ==5.1.0
  • iniconfig ==1.1.1
  • jaraco.classes ==3.2.3
  • keyring ==23.11.0
  • lockfile ==0.12.2
  • mangum ==0.17.0
  • mergedeep ==1.3.4
  • mkdocs *
  • mkdocs-material *
  • mkdocs-material-extensions *
  • mkdocs-render-swagger-plugin *
  • more-itertools ==9.0.0
  • msgpack ==1.0.4
  • numpy ==1.23.5
  • packageurl-python ==0.10.4
  • packaging ==21.3
  • pandas ==1.5.2
  • pip-api ==0.0.30
  • pip-requirements-parser ==32.0.0
  • pip_audit ==2.4.10
  • pkginfo ==1.9.2
  • pluggy ==1.0.0
  • pycparser ==2.21
  • pydantic ==1.10.2
  • pymdown-extensions ==9.9
  • pyparsing ==3.0.9
  • pytest ==7.2.0
  • pytest-asyncio ==0.20.2
  • python-dateutil ==2.8.2
  • pytz ==2022.6
  • pyyaml_env_tag ==0.1
  • rapidfuzz ==2.13.3
  • readme-renderer ==37.3
  • requests ==2.28.1
  • requests-toolbelt ==0.10.1
  • resolvelib ==0.9.0
  • rfc3986 ==1.5.0
  • rich ==12.6.0
  • scipy ==1.9.3
  • setuptools-pipfile ==0.4.1
  • six ==1.16.0
  • sniffio ==1.3.0
  • sortedcontainers ==2.4.0
  • starlette ==0.22.0
  • toml ==0.10.2
  • tomli ==2.0.1
  • tqdm ==4.64.1
  • twine ==3.2.0
  • typing_extensions ==4.4.0
  • urllib3 ==1.26.13
  • uvicorn ==0.20.0
  • watchdog ==2.2.0
  • webencodings ==0.5.1
  • zipp ==3.11.0
.github/workflows/build_client_sdk_with_poetry.yml actions
  • actions/cache v1 composite
  • actions/checkout v2 composite
  • actions/setup-python v2 composite
boaviztapi/data/utils/complete_AWS_EC2/go.mod go
poetry.lock pypi
  • aiofile 3.8.7
  • anyio 3.7.0
  • atomicwrites 1.4.1
  • babel 2.13.0
  • caio 0.9.12
  • certifi 2023.5.7
  • charset-normalizer 3.1.0
  • click 8.1.3
  • colorama 0.4.6
  • exceptiongroup 1.1.1
  • fastapi 0.95.2
  • ghp-import 2.1.0
  • h11 0.14.0
  • httpcore 0.17.2
  • httpx 0.24.1
  • idna 3.4
  • importlib-metadata 6.6.0
  • iniconfig 2.0.0
  • jinja2 3.1.2
  • mangum 0.17.0
  • markdown 3.4.3
  • markupsafe 2.1.3
  • mergedeep 1.3.4
  • mkdocs 1.5.3
  • mkdocs-macros-plugin 1.0.4
  • mkdocs-material 9.4.4
  • mkdocs-material-extensions 1.2
  • mkdocs-render-swagger-plugin 0.1.0
  • numpy 1.24.3
  • packaging 23.1
  • paginate 0.5.6
  • pandas 2.0.2
  • pathspec 0.11.2
  • platformdirs 3.11.0
  • pluggy 1.0.0
  • pydantic 1.10.9
  • pygments 2.16.1
  • pymdown-extensions 10.3
  • pytest 7.3.1
  • pytest-asyncio 0.21.0
  • python-dateutil 2.8.2
  • pytz 2023.3
  • pyyaml 6.0
  • pyyaml-env-tag 0.1
  • rapidfuzz 3.1.1
  • regex 2023.10.3
  • requests 2.31.0
  • scipy 1.9.3
  • six 1.16.0
  • sniffio 1.3.0
  • starlette 0.27.0
  • termcolor 2.3.0
  • toml 0.10.2
  • tomli 2.0.1
  • typing-extensions 4.6.3
  • tzdata 2023.3
  • urllib3 2.0.3
  • uvicorn 0.22.0
  • watchdog 3.0.0
  • zipp 3.15.0
pyproject.toml pypi
  • aiofile ^3.8
  • fastapi ^0.95
  • importlib-metadata ^6.6.0
  • mangum ^0.17
  • markdown ^3.4
  • numpy ^1.24
  • pandas ^2.0
  • pydantic ^1.10
  • python ^3.8
  • pyyaml ^6.0
  • rapidfuzz ^3.0
  • scipy ^1.9
  • toml ^0.10.2
  • uvicorn ^0.22