Strawberry GraphQL + Django: Simplify book database management with this powerful integration.
The project structure is as follows:
book/
: Contains the Django app for adding, updating, deleting books.django_berry/
: Main project directory.db.sqlite3
: SQLite database file.manage.py
: Django's command-line utility for administrative tasks.
- Users can add, update, delete books.
- GraphQL API: The API is implemented using the Strawberry framework, providing a GraphQL endpoint for interacting with the blog data.
-
Clone the repository:
git clone https://github.com/yourusername/django_berry.git
-
Navigate to the project directory:
cd django_berry
-
Create a virtual environment:
python -m venv venv
-
Activate the virtual environment:
-
On Windows:
venv\Scripts\activate
-
On macOS and Linux:
source venv/bin/activate
-
-
Install dependencies:
pip install -r requirements.txt
-
Apply migrations:
python manage.py makemigrations python manage.py migrate
-
Run the development server:
python manage.py runserver
-
Access the GraphQL endpoint at
http://localhost:8000/graphql/
to interact with the API. Perform CRUD Operations using GraphQL API
Contributions are welcome! If you'd like to contribute to this project, please follow these steps:
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature-name
). - Make your changes.
- Commit your changes (
git commit -am 'Add some feature'
). - Push to the branch (
git push origin feature/your-feature-name
). - Create a new Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.