Skip to content

Instantly share code, notes, and snippets.

View draincoder's full-sized avatar
😴

treaditup draincoder

😴
View GitHub Profile
@SamWarden
SamWarden / async_db_fixtures.py
Last active July 15, 2025 07:59
This is an example of fixtures for tests that depend on a Postgres database
import uuid
from collections.abc import AsyncGenerator, Generator
from typing import cast
import alembic.command
import pytest
from alembic.config import Config as AlembicConfig
from sqlalchemy import URL, Connection, text
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession, async_sessionmaker, create_async_engine
from testcontainers.postgres import PostgresContainer
@maratori
maratori / .golangci.yml
Last active December 5, 2025 13:50
Golden config for golangci-lint
# ==================================================================================================
#
# NOTICE
#
# This gist is no longer maintained. It was moved to repo:
#
# https://github.com/maratori/golangci-lint-config
#
# Full history and all v2 releases are preserved in the repo.
#