{"id":19676077,"url":"https://github.com/wannacry081/contacts-flask-api","last_synced_at":"2026-05-09T05:03:52.810Z","repository":{"id":178219594,"uuid":"661531602","full_name":"WannaCry081/Contacts-Flask-API","owner":"WannaCry081","description":" This is a secure Flask-based Contacts API with user authentication and management features.","archived":false,"fork":false,"pushed_at":"2023-07-09T02:39:51.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-27T05:51:46.445Z","etag":null,"topics":["docker","flask","flask-bcrypt","flask-cors","flask-jwt-extended","flask-marshmallow","flask-restful","flask-sqlalchemy"],"latest_commit_sha":null,"homepage":"","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/WannaCry081.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-03T04:57:09.000Z","updated_at":"2023-07-18T09:34:35.000Z","dependencies_parsed_at":"2023-09-16T19:42:51.303Z","dependency_job_id":null,"html_url":"https://github.com/WannaCry081/Contacts-Flask-API","commit_stats":null,"previous_names":["thedaydreamer01/contacts-flask-api","wannacry081/contacts-flask-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/WannaCry081/Contacts-Flask-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FContacts-Flask-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FContacts-Flask-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FContacts-Flask-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FContacts-Flask-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WannaCry081","download_url":"https://codeload.github.com/WannaCry081/Contacts-Flask-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WannaCry081%2FContacts-Flask-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32807861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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"}},"keywords":["docker","flask","flask-bcrypt","flask-cors","flask-jwt-extended","flask-marshmallow","flask-restful","flask-sqlalchemy"],"created_at":"2024-11-11T17:27:05.225Z","updated_at":"2026-05-09T05:03:52.794Z","avatar_url":"https://github.com/WannaCry081.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Contacts API\n\nThis is a simple Contacts API built with Flask and several popular extensions, including Flask-RESTful, Flask-SQLAlchemy, Flask-Marshmallow, Flask-Bcrypt, Flask-CORS, Flask-JWT-Extended, and more. The API allows users to manage their contact lists and provides user authentication to ensure privacy and security.\n\n## Features\n\n- User registration and authentication using JWT (JSON Web Tokens)\n- Create, read, update, and delete operations for contacts\n- User-specific contact lists to maintain privacy\n- Secure password hashing using Flask-Bcrypt\n- Cross-Origin Resource Sharing (CORS) support for handling cross-domain requests\n- Data serialization and deserialization using Flask-Marshmallow\n- Persistent storage and querying of contacts using Flask-SQLAlchemy\n- Consistent RESTful API design and error handling using Flask-RESTful\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/TheDayDreamer01/Contacts-Flask-API.git\n   cd contacts-flask-api\n   ```\n\n2. Create and activate a virtual environment:\n\n   ```bash\n   virtualenv env\n   source venv/bin/activate\n   ```\n\n3. Install the dependencies:\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. Configure the application by modifying the `config.py` file.\n\n5. Start the server:\n\n   ```bash\n   python server.py\n   ```\n\n   The API will be accessible at `http://localhost:5000`.\n\n## API Endpoints\n\n### Authentication\n\n- `POST /api/auth/register`: Register a new user. Required fields: `username`, `password`.\n- `POST /api/auth/login`: Log in with an existing user. Required fields: `username`, `password`.\n- `POST /api/auth/logout`: Log out the currently logged-in user.\n\n### Contacts\n\n- `GET /api/contacts`: Retrieve all contacts for the authenticated user.\n- `GET /api/contacts/\u003ccontact_id\u003e`: Retrieve a specific contact by ID.\n- `POST /api/contacts`: Create a new contact. Required fields: `name`, `phone`, `email`.\n- `PUT /api/contacts/\u003ccontact_id\u003e`: Update an existing contact by ID. Required fields: `name`, `phone`, `email`.\n- `DELETE /api/contacts/\u003ccontact_id\u003e`: Delete a contact by ID.\n\n## Error Handling\n\nThe API provides consistent error responses with appropriate status codes and error messages in case of any issues. Make sure to handle errors and exceptions in your client application.\n\n## Security\n\nUser authentication is implemented using JSON Web Tokens (JWT). Each request to protected endpoints requires the inclusion of a valid JWT token in the `Authorization` header. Unauthorized requests will be denied access.\n\n## Contributing\n\nContributions to this project are welcome! If you find any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE). Feel free to use, modify, and distribute the code for both commercial and non-commercial purposes.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwannacry081%2Fcontacts-flask-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwannacry081%2Fcontacts-flask-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwannacry081%2Fcontacts-flask-api/lists"}