Common interface for implementing job search drivers for The Pudim Hunter platform
Project description
Pudim Hunter Driver 🍮
Table of Contents
- Features
- Usage
- Project Structure
- Installation
- Virtual Environment Setup
- Development
- Contributing
- License
A Python package that provides a common interface for implementing job search drivers for The Pudim Hunter platform.
Features
- Common interface for implementing job board drivers
- Standardized job search query format
- Normalized job posting data structure
- Type hints and validation using Pydantic
- Async support for better performance
- Built-in error handling
Usage
Installation
You can install the package directly from PyPI:
# Install directly using pip
pip install pudim-hunter-driver
# Or add to your requirements.txt
pudim-hunter-driver>=0.0.2 # Replace with the version you need
For development installations, see the Development section.
Interface Overview
This package provides the base interface and models for implementing job search drivers. To create a driver for a specific job board, you'll need to create a new package that depends on pudim-hunter-driver and implement the JobDriver interface.
-
JobDriver(ABC) - The base interface that all drivers must implement:async fetch_jobs(query: JobQuery) -> JobListasync validate_credentials() -> bool
-
Data Models:
JobQuery- Search parametersJob- Normalized job posting dataJobList- Container for search results
-
Exceptions:
DriverError- Base exceptionAuthenticationError- For credential issuesQueryError- For search query issuesRateLimitError- For rate limiting issues
Example Implementation
Here's a basic example of how to implement a job driver:
from datetime import datetime
from pudim_hunter_driver.driver import JobDriver
from pudim_hunter_driver.models import Job, JobList, JobQuery
from pudim_hunter_driver.exceptions import AuthenticationError
class MyJobBoardDriver(JobDriver):
async def validate_credentials(self) -> bool:
# Implement your authentication logic
return True
async def fetch_jobs(self, query: JobQuery) -> JobList:
# Implement your job search logic
jobs = [
Job(
id="job-1",
title="Python Developer",
company="Example Corp",
location="Remote",
description="Join our team!",
url="https://example.com/jobs/1",
remote=True,
posted_at=datetime.now(),
source="MyJobBoard"
)
]
return JobList(
jobs=jobs,
total_results=1,
page=query.page,
items_per_page=query.items_per_page
)
For a complete working example with tests, check out the DummyDriver implementation in the tests/drivers/dummy_driver.py file.
Project Structure
pudim-hunter-driver/
├── src/
│ └── pudim_hunter_driver/
│ ├── __init__.py # Package initialization
│ ├── driver.py # JobDriver interface
│ ├── models.py # Data models
│ └── exceptions.py # Custom exceptions
├── tests/ # Test directory
│ └── __init__.py
├── README.md # This file
├── requirements.txt # Direct dependencies
├── setup.py # Package setup
└── pyproject.toml # Project configuration
Installation
From PyPI (coming soon):
pip install pudim-hunter-driver
From source:
git clone git@github.com:luismr/pudim-hunter-driver.git
cd pudim-hunter-driver
pip install -r requirements.txt
For development:
pip install -e .
Virtual Environment Setup
We strongly recommend using a virtual environment for development and testing. This isolates the project dependencies from your system Python packages.
Prerequisites
- Python 3.9 or higher
- pip (Python package installer)
- venv module (usually comes with Python 3)
macOS and Linux
- Open Terminal and navigate to the project directory:
cd pudim-hunter-driver
- Create a virtual environment:
python3.9 -m venv venv
- Activate the virtual environment:
source venv/bin/activate
- Install dependencies:
pip install -r requirements.txt
pip install -e . # for development
- To deactivate when done:
deactivate
Windows
- Open Command Prompt or PowerShell and navigate to the project directory:
cd pudim-hunter-driver
- Create a virtual environment:
python -m venv venv
- Activate the virtual environment:
- In Command Prompt:
.\venv\Scripts\activate.bat
- In PowerShell:
.\venv\Scripts\Activate.ps1
- Install dependencies:
pip install -r requirements.txt
pip install -e . # for development
- To deactivate when done:
deactivate
Troubleshooting
macOS/Linux
- If
python3.9is not found, install it using your package manager:- macOS (with Homebrew):
brew install python@3.9 - Ubuntu/Debian:
sudo apt-get install python39 python39-venv - CentOS/RHEL:
sudo yum install python39 python39-devel
- macOS (with Homebrew):
Windows
- Ensure Python is added to your PATH during installation
- If PowerShell execution policy prevents activation:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Development
- Create and activate a virtual environment:
python3.9 -m venv venv
source venv/bin/activate
- Install in development mode:
pip install -e .
Contributing
We love your input! We want to make contributing to Pudim Hunter Driver as easy and transparent as possible, whether it's:
- Reporting a bug
- Discussing the current state of the code
- Submitting a fix
- Proposing new features
- Becoming a maintainer
Getting Started
-
Fork the repository
# Clone the repository git clone git@github.com:luismr/pudim-hunter-driver.git cd pudim-hunter-driver # Create your feature branch git checkout -b feature/amazing-feature # Set up development environment python3.9 -m venv venv source venv/bin/activate pip install -e .
-
Make your changes
- Write clear, concise commit messages
- Add tests for any new functionality
- Ensure all tests pass:
pytest tests/ -v
-
Push to your fork and submit a pull request
git push origin feature/amazing-feature
Pull Request Process
- Update the README.md with details of changes if needed
- Add any new dependencies to requirements.txt
- Update the tests if needed
- The PR will be merged once you have the sign-off of the maintainers
Repository
- Main repository: github.com/luismr/pudim-hunter-driver
- Issue tracker: github.com/luismr/pudim-hunter-driver/issues
License
This project is licensed under the MIT License - see the LICENSE.md file for details.
Copyright (c) 2024-2025 Luis Machado Reis
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pudim-hunter-driver-0.0.8.tar.gz.
File metadata
- Download URL: pudim-hunter-driver-0.0.8.tar.gz
- Upload date:
- Size: 12.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b60397b89a0f28e0327c2ea1d6fc23e6e6099f36985412c6e328590f1d76586e
|
|
| MD5 |
b4b902b301e59bab39d87510d9aa860f
|
|
| BLAKE2b-256 |
38da34d646f8973ac9be840384dd0c6206a813e165eb7b390caed9464b1e091e
|
File details
Details for the file pudim_hunter_driver-0.0.8-py3-none-any.whl.
File metadata
- Download URL: pudim_hunter_driver-0.0.8-py3-none-any.whl
- Upload date:
- Size: 7.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03554e0c16eb05be0c6c995ca7ffd2fb374f8cdc7ff7a886134d4623fa30b025
|
|
| MD5 |
9118c16b356fb02ec4e69d0075ffc381
|
|
| BLAKE2b-256 |
673699140ce47eef59d71a4e2ba9b7fe60b2cd058ef9f1ac62523772dae78224
|