GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - mughal41/animalDbankApi: a minimal CRUD databank api for animals

BranchesTags
Open more actions menu

Latest commit

 

History

14 Commits
14 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
animalDbankApi
animalDbankApi
 
 
api
api
 
 
core
core
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
Screencast17-05-2025.webm
Screencast17-05-2025.webm
 
 
Uforia-Eval-AnimalDbankApi.postman_collection.json
Uforia-Eval-AnimalDbankApi.postman_collection.json
 
 
manage.py
manage.py
 
 
requirements.txt
requirements.txt
 
 

Repository files navigation

animalDbankApi

AnimalDbank is a Django REST API that interacts with a Dockerized backend service to fetch, normalize, and post animal data. It utilizes multi-threading to enhance performance while retrieving large datasets and includes retry mechanisms for improved network resilience.

Project Description

This project serves as a middleware layer between a frontend (or client) and a containerized backend API. It provides endpoints to:

  • Fetch animal details - using multi-threading to fetch animal-id and using it to fetch animal details from an internal service
  • Normalize data - (e.g., converting timestamps, splitting comma separated friend names into list)
  • Bulk submit - cleaned data to a secondary POST API endpoint

Workflow Overview

Data Retrieval: The API fetches paginated animal data from a Dockerized internal service. Multi-threading is used to fetch individual animal details concurrently. Gracefully retries in case of unexpected hangup or connection break.

Data Normalization: friends comma separated string is converted into a list. born_at timestamp is parsed and converted into UTC datetime.

Data Submission: Transformed data got from data retrieval endpoint is sent in batches (100 per request) to the targeted docker endpoint.


Installation

Step 1: Clone the repository

git clone https://github.com/mughal41/animalDbankApi.git
cd animalDbankApi

Step 2: Create a virtual environment

python3 -m venv .venv
source .venv/bin/activate # if os is linux

OR

python -m venv .venv
.\.venv\Scripts\activate # if using windows

Step 3: Install dependencies

pip install -r requirements.txt

Step 4: Run the development server

python manage.py runserver

Step 5: Download targetd docker image

wget https://storage.googleapis.com/lp-dev-hiring/images/lp-programming-challenge-1-1625758668.tar.gz

Step 6: Load the container

docker load -i lp-programming-challenge-1-1625610904.tar.gz

Step 7: Expose port 3123

docker run --rm -p 3123:3123 -ti lp-programming-challenge-1

Step 8: Running Local Tests

python manage.py test

About

a minimal CRUD databank api for animals

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.