{"id":25640598,"url":"https://github.com/khailas12/library-app-drf","last_synced_at":"2026-05-18T06:34:15.884Z","repository":{"id":219424191,"uuid":"749002990","full_name":"Khailas12/Library-APP-DRF","owner":"Khailas12","description":"A Book Management APP using Django REST Framework","archived":false,"fork":false,"pushed_at":"2024-05-25T04:24:59.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-23T04:46:05.699Z","etag":null,"topics":["basic-authentication","crud","djanogo-rest-framework","list-search","pagination","postgresql"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Khailas12.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-01-27T09:48:49.000Z","updated_at":"2024-05-25T04:25:03.000Z","dependencies_parsed_at":null,"dependency_job_id":"3d4dffa3-ad9a-4f80-919f-0265ce3231b6","html_url":"https://github.com/Khailas12/Library-APP-DRF","commit_stats":null,"previous_names":["khailas12/library-app-drf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Khailas12/Library-APP-DRF","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khailas12%2FLibrary-APP-DRF","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khailas12%2FLibrary-APP-DRF/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khailas12%2FLibrary-APP-DRF/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khailas12%2FLibrary-APP-DRF/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Khailas12","download_url":"https://codeload.github.com/Khailas12/Library-APP-DRF/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Khailas12%2FLibrary-APP-DRF/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273322154,"owners_count":25085034,"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","status":"online","status_checked_at":"2025-09-02T02:00:09.530Z","response_time":77,"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":["basic-authentication","crud","djanogo-rest-framework","list-search","pagination","postgresql"],"created_at":"2025-02-23T04:46:06.671Z","updated_at":"2026-05-18T06:34:10.861Z","avatar_url":"https://github.com/Khailas12.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Library APP DRF\n\n## Overview\n\nThis is a Django REST framework (DRF) project that provides an API for managing Books and Authors.\n\n## Features\n\n- **Superuser Authentication:**\n  - Secure API access using superuser credentials with Basic Auth.\n\n- **Authors:**\n  - CRUD operations.\n  - Search functionality for listing page.\n  - Pagination support for listing page.\n  - Detailed view for a specific author.\n  \n- **Books:**\n  - CRUD operations.\n  - Automatic generation of book_id based on creation time.\n  - Prevent creation of books with the same Book name.\n  - Search functionality for listing page.\n  - Pagination support for listing page.\n  - Detailed view for a specific book.\n  \n- **Book-Author Mapping:**\n  - CRUD operations, with mapping to respective authors.\n  - Assign multiple books to one author.\n\n\n## Installation\n\n1. Clone the repository:\n\n   ```bash\n   git clone https://github.com/Khailas12/Library-APP-DRF.git\n   ```\n2. Navigate to the project directory::\n   ```bash\n   cd Library-APP-DRF\n      ```\n3. Create a virtual environment:\n   ```bash\n   python -m venv venv\n      ```\n4. Activate the virtual environment:\n    ```bash\n    source venv/bin/activate\n    ```\n5. Install dependencies:\n   ```bash\n   pip install requirements.txt\n   ```\n\n# Connecting to PostgreSQL\nThis Django project uses PostgreSQL as its database engine. PostgreSQL is a powerful, open-source relational database management system. Connecting Django to PostgreSQL involves configuring the DATABASES setting in the settings.py file.\n\nDATABASES Configuration\nIn the settings.py file, the DATABASES setting is configured to use the ```django.db.backends.postgresql``` engine for PostgreSQL. The parameters such as NAME, USER, PASSWORD, HOST, and PORT define the connection details:\n\n### Refer this to [Connect PostgreSQL database to Django](https://codinggear.blog/how-to-connect-postgresql-database-to-django/)\n\n\nCreate a file named ```.env``` in the root of your Django project and add your confidential keys:\n#### .env\n```\nNAME=mydatabase\nUSER=mydatabaseuser\nPASSWORD=mypassword\n```\n### Load Environment Variables\nThe python-dotenv package is used to load environment variables from the .env file. \n#### settings.py\n```\nimport os\nfrom dotenv import load_dotenv\n\n# Load environment variables from .env\nload_dotenv()\n\nDATABASES = {\n    'default': {\n        'ENGINE': 'django.db.backends.postgresql',\n        'NAME': os.getenv(\"NAME\"), \n        'USER': os.getenv(\"USER\"),\n        'PASSWORD': os.getenv(\"PASSWORD\"),\n        'HOST': 'localhost', \n        'PORT': '5432',\n    }\n}\n```\n---\n#### or \n#### If the ```PostgreSQL``` is not required then please Uncomment the Sqlite Database's code instead in the ```settings.py``` \n---\n\n### 6. Apply database migrations:\n```\npython manage.py makemigrations\npython manage.py migrate\n```\n\n### 7. Create SuperUser:\n```\npython manage.py createsuperuser\n```\n\n### 8. Run the development server:\n```\npython manage.py runserver\n```\n\n---\n# Testing with Postman\n\nTo test the API endpoints using Postman, follow these steps:\n\n1. Open Postman and create a new request.\n\n2. Set the request method (GET, POST, etc.) based on the endpoint you want to test.\n\n3. Include the API endpoint URL, for example:\n   - `http://localhost:8000/books/` for listing books.\n\n4. Go to the \"Authorization\" tab in Postman.\n\n5. Choose \"Basic Auth\" as the type of authorization.\n\n6. Enter the superuser credentials:\n   - **Username:** your_superuser_username\n   - **Password:** your_superuser_password\n\n7. Send the request to test the API endpoint.\n\n**Note:** Superuser credentials are often created during the Django project setup.\n\n\n# Conclusion\n\nThank you for exploring the Library APP DRF project! I hope this README provides clear and concise instructions for setting up, configuring, and testing the application. If you encounter any issues or have suggestions for improvements, please feel free to open an issue or contribute to the project.\n#### Happy coding!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhailas12%2Flibrary-app-drf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkhailas12%2Flibrary-app-drf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkhailas12%2Flibrary-app-drf/lists"}