A modular, asynchronously driven FastAPI application designed to query live labor market data, calculate business statistics, and extract analytical insights from real-time job listings. This system functions as a robust middleware tier connecting upstream clients with live data providers.
This application utilizes a clean separation of concerns, separating routing interfaces from underlying business and computational services.
- Framework: FastAPI (Asynchronous Python Web Framework)
- Data Aggregation Engine: Adzuna API Integration
- Package Management: uv
- Testing Infrastructure: Pytest framework with full unit and integration test coverage
├── app/
│ ├── main.py # API Gateway / Application Entrypoint
│ ├── modules/
│ │ ├── jobs/ # Live job ingestion service
│ │ │ ├── routes.py
│ │ │ └── service.py
│ │ ├── stats/ # Quantitative calculations engine
│ │ │ ├── routes.py
│ │ │ └── service.py
│ │ └── analyze/ # Qualitative skill extraction module
│ │ ├── routes.py
│ │ └── service.py
│ └── tests/ # Unit & integration testing suites
├── pyproject.toml # Project metadata & dependencies
├── Dockerfile # Container build definition
└── DOCKER_SETUP.md # Docker usage reference
Handles live data retrieval directly from third-party talent market systems (Adzuna). It serves clean JSON responses representing current employment postings mapped by specific programmatic keywords or job titles.
Interceptors evaluate real-time listings to perform statistical calculations. Rather than returning raw unparsed strings, this module delivers quantitative market calculations (e.g., salary ranges, distributions, and posting volumes) to supply downstream applications with business insights.
Implements parsing algorithms to scan live job descriptions. It programmatically isolates and counts frequency metrics for industry-sought tech skills, converting dense prose into actionable career trend data.
Ensure you have Python 3.12+ and uv installed.
Navigate to the root directory and sync the project's dependencies (this creates a virtual environment automatically):
uv syncThe application requires Adzuna API credentials to fetch live job data. Create a .env file in the project root:
ADZUNA_APP_ID=your_app_id
ADZUNA_APP_KEY=your_app_keyLaunch the asynchronous development server using uvicorn:
uv run uvicorn app.main:app --reloadOnce the worker process initializes, the server will sit at http://127.0.0.1:8000.
FastAPI natively exposes OpenAPI documentation strings. While the application server is active, navigate to either of the following endpoints to evaluate, interact with, or test live query parameters:
- Swagger Interactive UI:
http://127.0.0.1:8000/docs - ReDoc Alternative UI:
http://127.0.0.1:8000/redoc
| Endpoint | Description |
|---|---|
GET /jobs?q={keyword} |
Ingests active listings matching specified keywords. |
GET /stats?q={keyword} |
Aggregates listings and computes quantitative market statistics. |
GET /analyze?q={keyword} |
Runs token frequency extraction to surface major tech skills required in current postings. |
The repository features comprehensive unit and integration tests inside the app/tests/ module. To verify route statuses, endpoint assertions, and mathematical parsing logic locally, run:
uv run pytestSee DOCKER_SETUP.md for building and running the application in a container.
This repository uses a 4-job GitHub Actions workflow in .github/workflows/pipeline.yml.
- Test: installs dependencies, runs unit tests, and enforces at least 80% coverage.
- Quality Gates: runs linting with Ruff and validates Adzuna credentials against the live API (on non-PR events).
- Build and Push: builds the Docker image and pushes tags (
latestand commit SHA) to Docker Hub. - Deploy: connects to an EC2 host over SSH, pulls the latest Docker image from Docker Hub, and runs the container.
DOPPLER_SERVICE_TOKEN
DOCKER_USERNAMEDOCKER_PASSWORDADZUNA_APP_IDADZUNA_APP_KEYAWS_IPAWS_EC2_USERNAMESSH_AWS_PEMAWS_EC2_PORT(optional; defaults to22in workflow)
- Docker must be installed on the target EC2 instance.
- The EC2 security group should allow inbound traffic on port
8000. - The SSH user must have permission to run Docker commands.