{"id":16654422,"url":"https://github.com/somada141/pwc-address-book-api","last_synced_at":"2026-04-29T04:07:42.288Z","repository":{"id":39762349,"uuid":"172694993","full_name":"somada141/pwc-address-book-api","owner":"somada141","description":"API backend for a simple address book implemented for the PwC interview process.","archived":false,"fork":false,"pushed_at":"2022-12-26T20:31:08.000Z","size":104,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-12-31T21:16:24.751Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/somada141.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","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":"2019-02-26T11:03:43.000Z","updated_at":"2019-02-26T11:05:20.000Z","dependencies_parsed_at":"2023-01-31T01:15:27.611Z","dependency_job_id":null,"html_url":"https://github.com/somada141/pwc-address-book-api","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/somada141/pwc-address-book-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somada141%2Fpwc-address-book-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somada141%2Fpwc-address-book-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somada141%2Fpwc-address-book-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somada141%2Fpwc-address-book-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/somada141","download_url":"https://codeload.github.com/somada141/pwc-address-book-api/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/somada141%2Fpwc-address-book-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32410011,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-29T03:46:11.172Z","status":"ssl_error","status_checked_at":"2026-04-29T03:37:55.317Z","response_time":110,"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":[],"created_at":"2024-10-12T09:49:44.163Z","updated_at":"2026-04-29T04:07:42.268Z","avatar_url":"https://github.com/somada141.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"====================\npwc-address-book-api\n====================\n\nAPI backend for a simple address book implemented for the PwC interview process.\n\nThis is a simple implementation of an address book API. The API is primarily implemented via the falcon_ framework, which in turn interacts with a MySQL server via SQLAlchemy_.\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\nFeatures\n--------\n\n* RESTful API implemented via falcon_.\n* API endpoint to retrieve all contacts from the database.\n* API endpoint to add new contacts to the database.\n* API endpoint to update contacts in the database.\n* API endpoint to upload a CSV file with contacts and receive a JSON response with the contents.\n\nProvisioning\n------------\n\nProvisioning of this project is performed via Ansible_.\n\nA provisioning role has been defined under ``roles/app-pwc-address-book-api`` while another role (``mysql``) has been pulled in as a Git subtree to facilitate the provisioning of the MySQL server.\n\nThe ``app-pwc-address-book-api`` role can be used to provision and deploy the role both to the local Vagrant_ VM (see below) and a remote server.\n\nDeployment\n----------\n\nDeployment to a remote server can be done via Ansible_ as such::\n\n    \u003e\u003e\u003e ansible-playbook -i path/to/ansible/inventory app-pwc-address-book-api.yaml\n\nConfiguration\n-------------\n\nThe application configuration is defined under the ``vars/main.yml`` file in the Ansible_ role in a YAML format.\n\nConfiguration accounts for:\n\n* MySQL Server databases and users along with credentials under the ``mysql_databases`` and ``mysql_users`` respectively. These settings override the defaults ones defined in the ``mysql`` role mentioned prior.\n* Application user/group and directory settings under the ``app_pwc_address_book_api`` key.\n* Gunicorn_ settings determining how the API is served behind Gunicorn_ under the ``app_pwc_address_book_api.gunicorn`` key.\n* Application-specific settings under the ``app_pwc_address_book_api.config`` key.\n\nThe application-specific under the ``app_pwc_address_book_api.config`` key are rendered into a JSON file which is in turn used to execute the application (see below).\n\nDevelopment\n-----------\n\nSetup\n^^^^^\n\nThis project is entirely developed within a local Vagrant_ VM based on the official ubuntu/trusty64_ base image.\n\nThe VM can be spun up through::\n\n    \u003e\u003e\u003e vagrant up\n\nVirtual Environment\n^^^^^^^^^^^^^^^^^^^\n\nUpon provisioning the application via Ansible_, a virtual-environment is created under the application folder, which\nby default is located under ``/usr/local/share/pwc-address-book-api/venvs/pwc-address-book-api``.\n\nThe virtual-environment needs to be activated prior to running, debugging, or testing the application as such::\n\n    \u003e\u003e\u003e source /usr/local/share/pwc-address-book-api/venvs/pwc-address-book-api/bin/activate\n\nExecution\n^^^^^^^^^\n\nThe API application can be executed by switching to the application user, enabling the virtual-environment, and serving the API through Gunicorn_::\n\n    \u003e\u003e\u003e sudo -Hu pwc-address-book-api bash\n    \u003e\u003e\u003e source /usr/local/share/pwc-address-book-api/venvs/pwc-address-book-api/bin/activate\n    \u003e\u003e\u003e PYTHONPATH=\"/home/vagrant/pwc-address-book-api/\" gunicorn --bind 0.0.0.0:8000 \"pabapi.pabapi:build_app('/etc/pwc-address-book-api/pwc-address-book-api.json')\" --timeout 600\n\nUnit-tests\n^^^^^^^^^^\n\nUnit-tests for the application have been written under the `tests` subpackage.\n\nThese can be executed via the included `Makefile` as such::\n\n    \u003e\u003e\u003e make test\n\nwhile unit-testing and coverage can be inspected with::\n\n    \u003e\u003e\u003e make coverage\n\nDocumentation\n^^^^^^^^^^^^^\n\nThe codebase adheres closely to the Google Python Style Guide (https://google.github.io/styleguide/pyguide.html) which is applied to the code comments and docstrings.\n\nThe project documentation is generated automatically via Sphinx_ using the napoleon_  extension which can parse Google-style docstrings and improve their legibility prior to rendering.\n\nDocumentation can be built via the included Makefile as such::\n\n    \u003e\u003e\u003e make docs\n\n.. _falcon: https://falconframework.org/\n.. _SQLAlchemy: https://www.sqlalchemy.org/\n.. _Ansible: https://www.ansible.com/\n.. _Vagrant: https://www.vagrantup.com/\n.. _ubuntu/trusty64: https://app.vagrantup.com/ubuntu/boxes/trusty64\n.. _Sphinx: http://www.sphinx-doc.org/en/stable/\n.. _napoleon: https://pypi.python.org/pypi/sphinxcontrib-napoleon\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n.. _Gunicorn: http://gunicorn.org/\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomada141%2Fpwc-address-book-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsomada141%2Fpwc-address-book-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsomada141%2Fpwc-address-book-api/lists"}