{"id":13813739,"url":"https://github.com/mozilla/servicebook","last_synced_at":"2025-05-15T01:31:28.019Z","repository":{"id":65984189,"uuid":"73175541","full_name":"mozilla/servicebook","owner":"mozilla","description":"A web service to manage our projects","archived":true,"fork":false,"pushed_at":"2019-01-22T22:05:07.000Z","size":1300,"stargazers_count":15,"open_issues_count":21,"forks_count":6,"subscribers_count":11,"default_branch":"master","last_synced_at":"2024-10-29T11:01:33.337Z","etag":null,"topics":["flask","python35"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mozilla.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-08T10:33:42.000Z","updated_at":"2024-10-11T12:21:06.000Z","dependencies_parsed_at":"2023-02-19T18:46:09.251Z","dependency_job_id":null,"html_url":"https://github.com/mozilla/servicebook","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fservicebook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fservicebook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fservicebook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mozilla%2Fservicebook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mozilla","download_url":"https://codeload.github.com/mozilla/servicebook/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225260493,"owners_count":17446092,"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","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":["flask","python35"],"created_at":"2024-08-04T04:01:28.064Z","updated_at":"2024-11-19T08:30:59.188Z","avatar_url":"https://github.com/mozilla.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"Service Book\n============\n\nMozilla Services projects API. Provides a Database of all projects and\na set of API to interact with them.\n\n.. image:: https://img.shields.io/badge/license-MPL%202.0-blue.svg\n   :target: https://github.com/mozilla/servicebook-web/blob/master/LICENSE.txt\n   :alt: License\n.. image:: https://img.shields.io/circleci/project/github/mozilla/servicebook/master.svg?logo=circleci\n   :alt: CircleCI\n   :target: https://circleci.com/gh/mozilla/servicebook/tree/master\n.. image:: https://img.shields.io/travis/mozilla/servicebook/master.svg?logo=travis\n   :target: https://travis-ci.org/mozilla/servicebook\n   :alt: Travis CI\n.. image:: https://img.shields.io/coveralls/github/mozilla/servicebook/master.svg\n   :alt: Coverage\n   :target: https://coveralls.io/github/mozilla/servicebook?branch=master\n.. image:: https://api.dependabot.com/badges/status?host=github\u0026repo=mozilla/servicebook\n   :target: https://dependabot.com\n   :alt: Dependabot\n\nUse the Service Book\n--------------------\n\nThe Service Book provides a RESTFul HTTP API. If you are using Python, you can\nuse the restjson client: https://github.com/tarekziade/restjson\n\nIt provides a simple tool to interact with the Service Book.\n\n\nRunning locally\n---------------\n\nThe servicebook uses a MySQL database by default, but you can use\nSQLITE3 or postgres by tweaking the **sqluri** option in **servicebook.ini**.\n\nCreate a local virtualenv, install requirements, initialize the DB\nthen run the service::\n\n    $ pipenv install --dev\n    $ pipenv shell\n    $ servicebook-import --sqluri mysql+pymysql://book:book@0.0.0.0/book\n    $ servicebook\n\nThe app runs on the 5001 port by default.\n\n\nRunning with Docker\n-------------------\n\nYou can run the app using the provided Dockerfile, by building the docker\nimage, then running it. It will bind the app to your 5001 port::\n\n    $ make docker-build\n    $ make docker-run\n\nThe Docker image will reach out for the database that's set\n**servicebook.ini**.\n\nRunning with external DB\n------------------------\n\nIf you would like to use an external DB for storage, be sure to set the default\ncharacter set for the database to UTF-8 (utf8mr for mysql).\n\n\nAuthentication\n--------------\n\nThe application can secure the HTTP API access for reads and/or writes.\n\nYou can define how anonymous accesses are handled with the\n**anonymous_access** variable in the **common** section of the config file.\n\nThe value to set is a permission **scope**. Possible values:\n\n- **read**: access to GET and HEAD calls - **default value when non specified**\n- **readwrite**: access to PATCH, PUT, POST, DELETE, GET, HEAD\n- **admin**: like readwrite - will be used for specific admin tasks\n\nClient can also have a privileged access with an API key.\nThe key is passed in the Authorization header, prefixed by APIKey::\n\n    Authorization APIKey ZGJkYWI3ZmQtZDEwNy00MzJiLWJlNDgtMjZkNTQyZGFiZDhi\n\nThe value is a base64-encoded UUID. Each application that wishes to get a\nprivileged access should have its own API key and scope.\n\nYou can list/add/revoke keys using the **servicebook-keys** command::\n\n    $ servicebook-keys --sqluri mysql+pymysql://book:book@0.0.0.0/book list\n    No keys!\n\n    $ servicebook-keys --sqluri mysql+pymysql://book:book@0.0.0.0/book add MyApp\n    App: MyApp, Key: 399c1365-3700-4ce6-8fd1-f304a32a0794, Scope: read\n\n    $ servicebook-keys --sqluri mysql+pymysql://book:book@0.0.0.0/book add MyApp2 --scope readwrite\n    App: MyApp2, Key: e87271fd-ca31-46cf-8cc5-48b1f9348e4e, Scope: readwrite\n\n    $ servicebook-keys --sqluri mysql+pymysql://book:book@0.0.0.0/book list\n    App: MyApp, Key: 399c1365-3700-4ce6-8fd1-f304a32a0794, Scope: read\n    App: MyApp2, Key: e87271fd-ca31-46cf-8cc5-48b1f9348e4e, Scope: readwrite\n\n    $ servicebook-keys --sqluri mysql+pymysql://book:book@0.0.0.0/book revoke MyApp\n    Key revoked for MyApp\n\n    $ servicebook-keys --sqluri mysql+pymysql://book:book@0.0.0.0/book list\n    App: MyApp2, Key: e87271fd-ca31-46cf-8cc5-48b1f9348e4e, Scope: readwrite\n\n\nThe default setup will make the data read-only and will require a privileged\naccess with **readwrite** scope for writing in the database.\n\nYou should have one separate key per calling service so it's easier to revoke or\nrenew a specific service access if required.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fservicebook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmozilla%2Fservicebook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmozilla%2Fservicebook/lists"}