Backend specificaties
De VEMAP Backend is gebouwd met Python en maakt gebruik van diverse libraries voor AWS integratie, database toegang en data validatie. Alle dependencies zijn productie-ready en worden actief onderhouden.
{/* requirements.txt */}chalice>=1.26.0boto3>=1.26.0psycopg2-binary>=2.9.0pydantic>=2.0.0email-validator>=2.0.0python-dotenv>=1.0.0Development dependencies zijn gescheiden in requirements-dev.txt om te voorkomen dat test dependencies worden geïnstalleerd in productie omgevingen.
Python Versie
Section titled “Python Versie”Vereist: Python 3.8 of hoger
De applicatie is getest en geoptimaliseerd voor Python 3.8+, met ondersteuning voor moderne Python features zoals type hints en async/await.
Productie Dependencies
Section titled “Productie Dependencies”| Dependency | Versie | Categorie | Gebruik | Belangrijke Features |
|---|---|---|---|---|
| Chalice | >=1.26.0 | AWS & Serverless | Serverless framework voor AWS Lambda en API Gateway | Routing, HTTP handling, automatische deployment, middleware ondersteuning |
| Boto3 | >=1.26.0 | AWS & Serverless | AWS SDK voor Python | S3, Cognito, SES, SQS, Secrets Manager integratie |
| psycopg2-binary | >=2.9.0 | Database | PostgreSQL database adapter | Native connecties, prepared statements, connection pooling, JSONB ondersteuning |
| Pydantic | >=2.0.0 | Data Validatie | Data validatie en settings management | Request/response validatie, type checking, JSON serialization |
| email-validator | >=2.0.0 | Data Validatie | Email adres validatie | RFC-compliant validatie, DNS checks, Pydantic integratie |
| python-dotenv | >=1.0.0 | Configuratie | Environment variable management | .env file loading, environment configuratie |
Development Dependencies
Section titled “Development Dependencies”| Dependency | Versie | Categorie | Gebruik | Belangrijke Features |
|---|---|---|---|---|
| pytest | >=7.0.0 | Testing | Unit en integration testing | Test discovery, fixtures, parametrization, coverage |
| pytest-mock | >=3.10.0 | Testing | Mocking voor tests | Mock objecten, patching, test isolation |
Installatie
Section titled “Installatie”Productie
Section titled “Productie”pip install -r requirements.txtDevelopment
Section titled “Development”# Installeer productie dependenciespip install -r requirements.txt
# Installeer development dependencies (optioneel)pip install -r requirements-dev.txt
# Optionele code quality toolspip install black mypy pylintDependency Management
Section titled “Dependency Management”Versie Strategie
Section titled “Versie Strategie”- Minimum versies (
>=) worden gebruikt voor flexibiliteit - Kritieke security updates worden direct toegepast
- Major version upgrades worden getest in development omgeving
- Breaking changes worden gedocumenteerd in CHANGELOG
Updates
Section titled “Updates”# Check for outdated packagespip list --outdated
# Update specific packagepip install --upgrade <package-name>
# Update all packages (met voorzichtigheid)pip install --upgrade -r requirements.txtSecurity
Section titled “Security”Alle dependencies worden regelmatig gescand op bekende vulnerabilities:
- AWS Security Bulletins voor Boto3
- GitHub Dependabot alerts
- Python Package Index (PyPI) security advisories
Compatibiliteit
Section titled “Compatibiliteit”| Dependency | Python 3.8 | Python 3.9 | Python 3.10 | Python 3.11 | Python 3.12 |
|---|---|---|---|---|---|
| Chalice | ✅ | ✅ | ✅ | ✅ | ✅ |
| Boto3 | ✅ | ✅ | ✅ | ✅ | ✅ |
| psycopg2-binary | ✅ | ✅ | ✅ | ✅ | ✅ |
| Pydantic | ✅ | ✅ | ✅ | ✅ | ✅ |
| email-validator | ✅ | ✅ | ✅ | ✅ | ✅ |
| python-dotenv | ✅ | ✅ | ✅ | ✅ | ✅ |
Licenties
Section titled “Licenties”Alle gebruikte dependencies zijn open-source met permissive licenties:
| Dependency | Licentie |
|---|---|
| Chalice | Apache License 2.0 |
| Boto3 | Apache License 2.0 |
| psycopg2-binary | LGPL with exceptions |
| Pydantic | MIT License |
| email-validator | CC0 1.0 Universal |
| python-dotenv | BSD License |