Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
import functools | |
import importlib | |
import os | |
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "config.settings") # noqa | |
import anyio | |
from asgiref.sync import sync_to_async | |
from django.conf import settings | |
from django.core.wsgi import get_wsgi_application |
Inspired by dannyfritz/commit-message-emoji
See also gitmoji.
Commit type | Emoji |
---|---|
Initial commit | 🎉 :tada: |
Version tag | 🔖 :bookmark: |
New feature | ✨ :sparkles: |
Bugfix | 🐛 :bug: |
from fastapi import APIRouter, FastAPI | |
from utils import create_versioning_docs | |
app = FastAPI(docs_url=None, redoc_url=None) | |
v1_router = APIRouter(prefix="/v1") | |
v2_router = APIRouter(prefix="/v2") |
import anyio | |
from fastapi import FastAPI | |
app = FastAPI() | |
@app.on_event("startup") | |
async def startup(): | |
limiter = anyio.to_thread.current_default_thread_limiter() |
""" | |
Script to export the ReDoc documentation page into a standalone HTML file. | |
Created by https://github.com/pawamoy on https://github.com/Redocly/redoc/issues/726#issuecomment-645414239 | |
""" | |
import json | |
from my_app.app import app | |
HTML_TEMPLATE = """<!DOCTYPE html> |
import asyncio | |
from typing import Type | |
from aio_pika import RobustConnection, connect_robust | |
from aio_pika.connection import ConnectionType | |
from aio_pika.types import TimeoutType | |
class RabbitMQClient: | |
def __init__( |
Before we look at some common commands, I just want to note a few keyboard commands that are very helpful:
Up Arrow
: Will show your last commandDown Arrow
: Will show your next commandTab
: Will auto-complete your commandCtrl + L
: Will clear the screenHere's a summary of common Python time conversions
Some methods drop fractions of seconds, and are marked with (s).
from confluent_kafka import Consumer, Producer, KafkaError, KafkaException | |
class Kafka: | |
def __init__(self, bootstrap_server, topic, timeout=1.0): | |
self.__bootstrap_server = bootstrap_server | |
self.__topic = topic | |
self.__timeout = timeout | |
@staticmethod |
import asyncio | |
from confluent_kafka import Consumer, Producer | |
from confluent_kafka.admin import AdminClient, NewTopic | |
BROKER_URL = "PLAINTEXT://localhost:9092" | |
TOPIC_NAME = "my-first-python-topic" | |