{"id":18247147,"url":"https://github.com/madhvi-n/django-kafka","last_synced_at":"2025-04-04T14:31:27.769Z","repository":{"id":166495044,"uuid":"640121459","full_name":"madhvi-n/django-kafka","owner":"madhvi-n","description":"Django application integrated with Kafka messaging system for efficient asynchronous data processing and near real-time updates.","archived":true,"fork":false,"pushed_at":"2023-05-19T15:52:52.000Z","size":57,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T15:17:30.543Z","etag":null,"topics":["django","docker","kafka-producer-consumer","postgresql","redis","zookeeper"],"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/madhvi-n.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}},"created_at":"2023-05-13T04:06:11.000Z","updated_at":"2023-07-13T15:41:42.000Z","dependencies_parsed_at":"2023-07-12T02:16:17.603Z","dependency_job_id":null,"html_url":"https://github.com/madhvi-n/django-kafka","commit_stats":null,"previous_names":["madhvi-n/django-kafka"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhvi-n%2Fdjango-kafka","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhvi-n%2Fdjango-kafka/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhvi-n%2Fdjango-kafka/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/madhvi-n%2Fdjango-kafka/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/madhvi-n","download_url":"https://codeload.github.com/madhvi-n/django-kafka/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247194040,"owners_count":20899418,"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":["django","docker","kafka-producer-consumer","postgresql","redis","zookeeper"],"created_at":"2024-11-05T09:29:19.357Z","updated_at":"2025-04-04T14:31:27.763Z","avatar_url":"https://github.com/madhvi-n.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django Kafka CRUD\nDjango Kafka CRUD is a Django-based CRUD application integrated with Kafka messaging system for asynchronous data processing. It allows you to save and retrieve student records using REST endpoints. The application leverages Kafka to ensure efficient handling of data-intensive tasks and provides near real-time updates.\n\n[![Django CI](https://github.com/madhvi-n/store-monitoring/actions/workflows/django.yml/badge.svg)](https://github.com/madhvi-n/store-monitoring/actions/workflows/django.yml)\n\n\n## Project requirements\n- Python 3.10\n- Docker\n\n## Installation\n- Clone the repository and navigate to the root directory\n    ```\n    git clone https://github.com/madhvi-n/django_kafka_crud.git\n    cd django_kafka_crud\n    ```\n\n\n- Create a virtual environment and activate it\n    ```\n    virtualenv venv --python=python3\n    source venv/bin/activate\n    ```\n\n- Making sure your virtual environment is activated, install the dependencies using `pip`\n    ```\n    pip install -r requirements.txt\n    ```\n\n- Create a `.env` file in the root directory of the project and configure the required environment variables. Refer to the `.env.sample` file for the list of variables and their sample values.\n\n\n- Create postgresql database using `psql` and store the credentials in .env\n    ```\n    psql -U postgres\n    CREATE DATABASE your_database_name;\n    GRANT ALL PRIVILEGES ON DATABASE your_database_name TO your_username;\n    ```\n- Run django migrations and create superuser to access django admin\n    ```\n    python manage.py migrate\n    python manage.py createsuperuser\n    ```\n    Note: You might run into an error for postgres settings in Django. Bypass it by changing the host to localhost but make sure to change it back when running Docker. \n    \n- Build the docker images defined in docker compose file and start the containers in detached mode (in the background) \n    ```\n    docker compose build \u0026\u0026 docker compose up -d\n    ```\n\n\n- Access the students api at the endpoint `http://localhost:8000/api/v1/students/`\n\n\n- The application should now be running locally. Access it in your web browser at `http://localhost:8000`.\n\n\n\n## Summary of the configuration(what each file does):\n**Dockerfile**:\n- Sets the base image as Python 3.10.\n- Sets environment variables.\n- Sets the working directory.\n- Copies the requirements.txt file and installs project dependencies.\n- Copies all project files.\n- Exposes port 8000.\n- Defines the CMD instruction to run migrations and start the Django development server.\n\n**docker-compose.yml**:\n- Defines multiple services including `Redis`, `PostgreSQL`, `ZooKeeper`, `Kafka`, and `Django`.\n- Configures the necessary environment variables for each service.\n- Maps ports for `PostgreSQL`, `ZooKeeper`, and `Kafka`.\n- Specifies dependencies using the `depends_on` directive.\n- Defines a volume for the PostgreSQL data.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadhvi-n%2Fdjango-kafka","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmadhvi-n%2Fdjango-kafka","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmadhvi-n%2Fdjango-kafka/lists"}