Skip to content

Instantly share code, notes, and snippets.

View Apakottur's full-sized avatar
🐒

Yossi Rozantsev Apakottur

🐒
View GitHub Profile
@Apakottur
Apakottur / aws.py
Last active May 3, 2025 12:52
Moto + aiobotocore
from collections.abc import Awaitable, Callable, Iterator
from dataclasses import dataclass
from typing import Any, TypeVar
import aiobotocore
import aiobotocore.awsrequest
import aiobotocore.endpoint
import aiobotocore.httpchecksum
import aiobotocore.response
import botocore.awsrequest
@Apakottur
Apakottur / example.py
Created April 11, 2022 13:20
Using BigInteger in with_loader_criteria
import asyncio
from sqlalchemy import Integer, insert, sql, BigInteger, select, tuple_, func
from sqlalchemy import Column, String
from sqlalchemy.event import listens_for
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import (
sessionmaker,
declarative_mixin,
@Apakottur
Apakottur / example.py
Created April 6, 2022 17:38
BigInt with tuple_ example
import asyncio
from sqlalchemy import Integer, insert, sql, BigInteger, select, tuple_, func
from sqlalchemy import Column, String
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
_HOST = "localhost"
_PORT = 5432
@Apakottur
Apakottur / example.py
Created April 6, 2022 16:00
Broken RETURNING example
import asyncio
from sqlalchemy import Integer, insert, sql
from sqlalchemy import Column, String
from sqlalchemy.ext.asyncio import create_async_engine, AsyncSession
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy.orm import sessionmaker
_HOST = "localhost"
_PORT = 5432
@Apakottur
Apakottur / Dockerfile
Last active January 28, 2022 16:45
Coverage bug (SQLAlchemy + aiosqlite + strawberry-graphql)
FROM python:3.10.1-slim-bullseye
RUN pip install \
sqlalchemy==1.4.31 \
strawberry-graphql==0.95.1 \
coverage==6.3.0 \
aiosqlite==0.17.0
WORKDIR /src/