python
18 posts
Knative KafkaChannel, Subscriptions, and SinkBinding
Build an event-driven pipeline with Knative KafkaChannel, Subscriptions, and SinkBinding. Compare channels with brokers and connect Python event producers.
Troubleshoot Knative Eventing with Kafka: Useful Commands
Debug Knative Eventing with Kafka using kn and kubectl commands. Inspect services, revisions, triggers, Kafka sources, and event delivery.
Python Mock side_effect: Return Values Based on Input
Use Python unittest.mock side_effect with a custom iterator to return different values while preserving method arguments in mocked results.
Consume Kafka Events with Knative and FastAPI on Kubernetes
Build an event-driven Python service with FastAPI, Kafka, and Knative on Kubernetes. Configure Kafka sources, brokers, and triggers to route events.
Manage Python Versions and Virtualenvs with pyenv on Apple M1
Manage Python versions and virtual environments on Apple M1 with pyenv, pyenv-virtualenv, and virtualenvwrapper. Install tools and switch between projects.
Install psycopg2-binary on Apple M1 Macs
Install psycopg2-binary on an Apple M1 Mac with Homebrew PostgreSQL and OpenSSL. Configure compiler flags and dependencies for the Python database adapter.
Django Admin Multi-Select Fields with ArrayField and JSONField
Add multi-select choice fields to Django admin using PostgreSQL ArrayField or JSONField. Compare default inputs, custom widgets, and admin form examples.
Using DynamoDB with FastAPI
Connect FastAPI to AWS DynamoDB with a local Docker setup, Python application code, pytest tests, and Terraform configuration for your database table.
Test HTTPX Requests with pytest, RESPX, and VCR.py
Test async HTTPX requests with pytest and RESPX, then record and replay HTTP interactions with VCR.py. Includes fixtures, configuration, and examples.
Python Type Hints with Generic and TypeVar
Use Python Generic and TypeVar to build reusable, typed repository classes. Follow a practical example with type annotations checked by mypy.
Configure PostgreSQL SSL with SQLAlchemy and AWS RDS
Configure an SSL connection to PostgreSQL with SQLAlchemy, including AWS RDS certificates, a Python SSL context, and async engine connection settings.
SQLAlchemy 1.4 Async ORM with FastAPI and PostgreSQL
Build an async FastAPI backend with SQLAlchemy 1.4 ORM, PostgreSQL, and asyncpg. Configure database sessions, Alembic migrations, and your project structure.
What's New in Python 3.10: Pattern Matching and Type Hints
Explore Python 3.10 features with code examples, including structural pattern matching, parenthesized context managers, and improvements to type hints.
FastAPI with Async PostgreSQL, SQLAlchemy Core, and Alembic
Configure FastAPI with async PostgreSQL using databases and SQLAlchemy Core. Set up Docker, Alembic migrations, and tests for your Python backend.
CI/CD for Python on App Engine with Google Cloud Build
Configure Google Cloud Build to test and deploy a Python App Engine application, using Docker services, pytest, and Secret Manager in your CI/CD pipeline.
Deploy Django to AWS Elastic Beanstalk with RDS
Deploy a Django application to AWS Elastic Beanstalk, configure an RDS database, and run migrations, static file collection, and Django admin setup.
Django REST Framework on App Engine Standard with Python 3.7
Build and deploy a Django REST Framework API on Google App Engine Standard with Python 3.7, Cloud SQL, Cloud Tasks, and a local Docker environment.
How to Build an Alexa Skill with Python and Falcon
Build a joke-telling Alexa skill with Python and Falcon. Define intents, handle HTTP webhooks, and connect your application to the Alexa developer console.