Overview
This guide will get you from zero to making your first API call in under 5 minutes. We’ll use SQLite for quick setup, but PostgreSQL is recommended for production.For a complete production setup with PostgreSQL, Redis, and Celery, see the Installation Guide.
Prerequisites
Before you begin, ensure you have:- Python 3.11+ installed on your system
- Git for cloning the repository
- Basic familiarity with command line operations
Installation
1
Clone the Repository
Clone the FKApi repository to your local machine:
2
Create Virtual Environment
Create and activate a Python virtual environment:
3
Install Dependencies
Install all required Python packages:This installs Django 5.0.4, Django Ninja, PostgreSQL adapter, BeautifulSoup4, Redis client, and other dependencies.
4
Configure Environment
Create a For quickstart, edit
.env file from the example:.env with minimal settings:.env
5
Set Up Database
Create the PostgreSQL database and run migrations:
6
Create Superuser
Create an admin user for the Django admin interface:Follow the prompts to set username, email, and password.
7
Start the Server
Launch the development server:You should see:
Your First API Call
Health Check
Verify the API is running:Populating Data
Test Scraping (Single Kit)
Before bulk scraping, test with a single kit:Search for the Kit
Once scraped, search for kits:Search Clubs
Search for clubs with fuzzy matching:Interactive API Documentation
Explore all endpoints in the auto-generated Swagger UI:- Try out endpoints directly in the browser
- View request/response schemas
- See all available parameters and filters
- Copy code examples in multiple languages
Common Endpoints
Here are the most commonly used endpoints:Search Clubs
Get Club Kits
List Kits
Search Seasons
Next Steps
1
Explore More Endpoints
Visit the API Reference to see all available endpoints and their parameters
2
Populate Your Database
Learn ethical scraping practices in the Getting Started guide to populate your database responsibly
3
Production Setup
Follow the Installation Guide for PostgreSQL, Redis caching, and Celery configuration
4
Configure Rate Limiting
Set up IP whitelisting and adjust rate limits for your use case
Troubleshooting
Database Connection Errors
If you see database connection errors:Empty API Responses
If endpoints return empty arrays[]:
This is normal! The database starts empty. You need to scrape data using management commands like
scrape_kit_by_slug or scrape_whole_club.Port Already in Use
If port 8000 is occupied:Migration Errors
If migrations fail:Getting Help
- Check the Installation Guide for detailed setup instructions
- Visit the API documentation at
http://localhost:8000/api/docs - Review the source code on GitHub
- Check the CHANGELOG.md for version-specific notes