Initial commit

This commit is contained in:
Abdulaziz Axmadaliyev
2026-02-26 16:35:47 +05:00
commit 92165edbe6
2984 changed files with 629155 additions and 0 deletions

8
.env Normal file
View File

@@ -0,0 +1,8 @@
PAYME_MERCHANT_ID=699e8a5fbbf6bc7219737538
PAYME_SECRET_KEY=fX5shuxVvr@RgmZMU3U61no#XQkT&S&Tob@o
SHOPIFY_ACCESS_TOKEN=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
SHOPIFY_STORE_URL=cx0du9-sq.myshopify.com
SHOPIFY_WEBHOOK_SECRET=2d8e668f7ad3c78bf04cc7676e9c2d4bdd80ce45a88cc4f91110e41ff4cfc844
DATABASE_URL=postgresql://payme_user:payme_pass@db:5432/payme_db

8
.env.example Normal file
View File

@@ -0,0 +1,8 @@
PAYME_MERCHANT_ID=699e8a5fbbf6bc7219737538
PAYME_SECRET_KEY=fX5shuxVvr@RgmZMU3U61no#XQkT&S&Tob@o
SHOPIFY_ACCESS_TOKEN=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
SHOPIFY_STORE_URL=cx0du9-sq.myshopify.com
SHOPIFY_WEBHOOK_SECRET=2d8e668f7ad3c78bf04cc7676e9c2d4bdd80ce45a88cc4f91110e41ff4cfc844
DATABASE_URL=postgresql://payme_user:payme_pass@db:5432/payme_db

10
.idea/.gitignore generated vendored Normal file
View File

@@ -0,0 +1,10 @@
# Default ignored files
/shelf/
/workspace.xml
# Ignored default folder with query files
/queries/
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

12
.idea/dataSources.xml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DataSourceManagerImpl" format="xml" multifile-model="true">
<data-source source="LOCAL" name="payme_db@localhost" uuid="83c2223f-2d39-49b2-a34c-2d5430817fad">
<driver-ref>postgresql</driver-ref>
<synchronize>true</synchronize>
<jdbc-driver>org.postgresql.Driver</jdbc-driver>
<jdbc-url>jdbc:postgresql://localhost:5432/payme_db</jdbc-url>
<working-dir>$ProjectFileDir$</working-dir>
</data-source>
</component>
</project>

View File

@@ -0,0 +1,35 @@
<component name="InspectionProjectProfileManager">
<profile version="1.0">
<option name="myName" value="Project Default" />
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="PyPackageRequirementsInspection" enabled="true" level="WARNING" enabled_by_default="true">
<option name="ignoredPackages">
<list>
<option value="attrs" />
<option value="channels" />
<option value="channels_redis" />
<option value="django-filter" />
<option value="djangorestframework" />
<option value="drf-spectacular" />
<option value="inflection" />
<option value="iniconfig" />
<option value="jsonschema" />
<option value="jsonschema-specifications" />
<option value="msgpack" />
<option value="packaging" />
<option value="pillow" />
<option value="pluggy" />
<option value="Pygments" />
<option value="pytest" />
<option value="pytest-django" />
<option value="PyYAML" />
<option value="redis" />
<option value="referencing" />
<option value="rpds-py" />
<option value="typing_extensions" />
<option value="uritemplate" />
</list>
</option>
</inspection_tool>
</profile>
</component>

View File

@@ -0,0 +1,6 @@
<component name="InspectionProjectProfileManager">
<settings>
<option name="USE_PROJECT_PROFILE" value="false" />
<version value="1.0" />
</settings>
</component>

12
.idea/material_theme_project_new.xml generated Normal file
View File

@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MaterialThemeProjectNewConfig">
<option name="metadata">
<MTProjectMetadataState>
<option name="migrated" value="true" />
<option name="pristineConfig" value="false" />
<option name="userId" value="7f46499f:198641aec83:-7ff4" />
</MTProjectMetadataState>
</option>
</component>
</project>

7
.idea/misc.xml generated Normal file
View File

@@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="Black">
<option name="sdkName" value="Python 3.12 (payme_shopify_service)" />
</component>
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.12 (payme_shopify_service)" project-jdk-type="Python SDK" />
</project>

8
.idea/modules.xml generated Normal file
View File

@@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/payme_shopify_service.iml" filepath="$PROJECT_DIR$/.idea/payme_shopify_service.iml" />
</modules>
</component>
</project>

10
.idea/payme_shopify_service.iml generated Normal file
View File

@@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/venv" />
</content>
<orderEntry type="jdk" jdkName="Python 3.12 (payme_shopify_service)" jdkType="Python SDK" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

18
Dockerfile Normal file
View File

@@ -0,0 +1,18 @@
FROM python:3.11-slim
WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD ["sh", "-c", "\
echo 'Waiting for database...' && \
while ! python -c \"import psycopg2; psycopg2.connect('$DATABASE_URL')\" 2>/dev/null; do \
sleep 1; \
done && \
echo 'Database ready!' && \
alembic upgrade head && \
uvicorn app.main:app --host 0.0.0.0 --port 8000 \
"]

0
README.md Normal file
View File

37
alembic.ini Normal file
View File

@@ -0,0 +1,37 @@
[alembic]
script_location = alembic
prepend_sys_path = .
[loggers]
keys = root,sqlalchemy,alembic
[handlers]
keys = console
[formatters]
keys = generic
[logger_root]
level = WARN
handlers = console
qualname =
[logger_sqlalchemy]
level = WARN
handlers =
qualname = sqlalchemy.engine
[logger_alembic]
level = INFO
handlers =
qualname = alembic
[handler_console]
class = StreamHandler
args = (sys.stderr,)
level = NOTSET
formatter = generic
[formatter_generic]
format = %(levelname)-5.5s [%(name)s] %(message)s
datefmt = %H:%M:%S

49
alembic/env.py Normal file
View File

@@ -0,0 +1,49 @@
import os
from logging.config import fileConfig
from sqlalchemy import engine_from_config, pool
from alembic import context
from app.db.base import Base
from app.models.transaction import Transaction # noqa: makes Alembic detect the model
config = context.config
# Use DATABASE_URL from environment (set by docker-compose via .env)
database_url = os.environ.get("DATABASE_URL")
if database_url:
config.set_main_option("sqlalchemy.url", database_url)
if config.config_file_name is not None:
fileConfig(config.config_file_name)
target_metadata = Base.metadata
def run_migrations_offline() -> None:
url = config.get_main_option("sqlalchemy.url")
context.configure(
url=url,
target_metadata=target_metadata,
literal_binds=True,
dialect_opts={"paramstyle": "named"},
)
with context.begin_transaction():
context.run_migrations()
def run_migrations_online() -> None:
connectable = engine_from_config(
config.get_section(config.config_ini_section, {}),
prefix="sqlalchemy.",
poolclass=pool.NullPool,
)
with connectable.connect() as connection:
context.configure(connection=connection, target_metadata=target_metadata)
with context.begin_transaction():
context.run_migrations()
if context.is_offline_mode():
run_migrations_offline()
else:
run_migrations_online()

24
alembic/script.py.mako Normal file
View File

@@ -0,0 +1,24 @@
"""${message}
Revision ID: ${up_revision}
Revises: ${down_revision | comma,n}
Create Date: ${create_date}
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
${imports if imports else ""}
revision: str = ${repr(up_revision)}
down_revision: Union[str, None] = ${repr(down_revision)}
branch_labels: Union[str, Sequence[str], None] = ${repr(branch_labels)}
depends_on: Union[str, Sequence[str], None] = ${repr(depends_on)}
def upgrade() -> None:
${upgrades if upgrades else "pass"}
def downgrade() -> None:
${downgrades if downgrades else "pass"}

View File

@@ -0,0 +1,31 @@
"""create transactions table
Revision ID: 0001
Revises:
Create Date: 2026-02-25
"""
from typing import Sequence, Union
from alembic import op
import sqlalchemy as sa
revision: str = "0001"
down_revision: Union[str, None] = None
branch_labels: Union[str, Sequence[str], None] = None
depends_on: Union[str, Sequence[str], None] = None
def upgrade() -> None:
op.create_table(
"transactions",
sa.Column("id", sa.Integer(), primary_key=True, index=True),
sa.Column("order_id", sa.String(), nullable=False),
sa.Column("payme_transaction_id", sa.String(), unique=True, nullable=True),
sa.Column("amount", sa.BigInteger(), nullable=False),
sa.Column("state", sa.Integer(), default=0),
sa.Column("created_at", sa.DateTime(timezone=True), server_default=sa.func.now()),
sa.Column("updated_at", sa.DateTime(timezone=True), onupdate=sa.func.now()),
)
def downgrade() -> None:
op.drop_table("transactions")

0
app/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

0
app/api/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

0
app/api/health.py Normal file
View File

45
app/api/payme.py Normal file
View File

@@ -0,0 +1,45 @@
from fastapi import APIRouter, Request, Depends
from sqlalchemy.orm import Session
from app.db.session import get_db
from app.core.security import verify_payme_auth
from app.services.payme_service import (
check_perform_transaction,
create_transaction_handler,
perform_transaction_handler,
cancel_transaction_handler,
)
router = APIRouter()
@router.post("/payme")
async def payme_webhook(
request: Request,
db: Session = Depends(get_db),
_: None = Depends(verify_payme_auth),
):
body = await request.json()
method = body.get("method")
params = body.get("params", {})
request_id = body.get("id")
if method == "CheckPerformTransaction":
result = await check_perform_transaction(params)
elif method == "CreateTransaction":
result = await create_transaction_handler(db, params)
elif method == "PerformTransaction":
result = await perform_transaction_handler(db, params)
elif method == "CancelTransaction":
result = await cancel_transaction_handler(db, params)
else:
return {
"jsonrpc": "2.0",
"id": request_id,
"error": {"code": -32601, "message": "Method not found"},
}
return {
"jsonrpc": "2.0",
"id": request_id,
"result": result,
}

78
app/api/shopify.py Normal file
View File

@@ -0,0 +1,78 @@
# app/api/shopify.py
import json
import base64
import hmac
import hashlib
from fastapi import APIRouter, Request, HTTPException
from app.core.config import settings
router = APIRouter()
def create_payme_payment_link(order_id: str, amount_uzs: float) -> str:
"""Generate a Payme checkout URL"""
# Amount must be in tiyin (1 UZS = 100 tiyin)
amount_tiyin = int(amount_uzs * 100)
# Payme requires account params to be base64-encoded
import json
account = json.dumps({"order": str(order_id)})
account_encoded = base64.b64encode(account.encode()).decode()
merchant_id = settings.PAYME_MERCHANT_ID
# Payme checkout URL format
params = f"m={merchant_id};ac.order={order_id};a={amount_tiyin}"
params_encoded = base64.b64encode(params.encode()).decode()
return f"https://checkout.paycom.uz/{params_encoded}"
@router.post("/shopify/order-created")
async def order_created(request: Request):
raw_body = await request.body()
# Verify Shopify webhook signature
hmac_header = request.headers.get("X-Shopify-Hmac-Sha256")
computed_hmac = base64.b64encode(
hmac.new(
settings.SHOPIFY_WEBHOOK_SECRET.encode(),
raw_body,
hashlib.sha256
).digest()
).decode()
if not hmac.compare_digest(computed_hmac, hmac_header or ""):
raise HTTPException(status_code=401, detail="Invalid webhook")
data = json.loads(raw_body)
order_id = str(data["id"])
total_price = float(data["total_price"])
customer_email = data.get("email", "")
# Generate Payme payment link
payment_link = create_payme_payment_link(order_id, total_price)
# Add the link as an order note in Shopify so customer can see it
await add_payment_link_to_order(order_id, payment_link)
return {"status": "payment_link_created", "link": payment_link}
async def add_payment_link_to_order(order_id: str, payment_link: str):
"""Add payment link as a note on the Shopify order"""
import httpx
url = f"https://{settings.SHOPIFY_STORE_URL}/admin/api/2024-01/orders/{order_id}.json"
headers = {
"X-Shopify-Access-Token": settings.SHOPIFY_ACCESS_TOKEN,
"Content-Type": "application/json",
}
payload = {
"order": {
"id": order_id,
"note": f"Payme payment link: {payment_link}"
}
}
async with httpx.AsyncClient() as client:
await client.put(url, json=payload, headers=headers)

0
app/core/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

18
app/core/config.py Normal file
View File

@@ -0,0 +1,18 @@
from pydantic_settings import BaseSettings
class Settings(BaseSettings):
PAYME_MERCHANT_ID: str
PAYME_SECRET_KEY: str
SHOPIFY_ACCESS_TOKEN: str
SHOPIFY_STORE_URL: str
SHOPIFY_WEBHOOK_SECRET: str
DATABASE_URL: str
class Config:
env_file = ".env"
settings = Settings()

10
app/core/constants.py Normal file
View File

@@ -0,0 +1,10 @@
# Payme states
STATE_NEW = 0
STATE_CREATED = 1
STATE_COMPLETED = 2
STATE_CANCELLED = -1
# Payme error codes
ERROR_INVALID_AMOUNT = -31001
ERROR_TRANSACTION_NOT_FOUND = -31003
ERROR_CANNOT_PERFORM = -31008

18
app/core/security.py Normal file
View File

@@ -0,0 +1,18 @@
import base64
from fastapi import Request, HTTPException
from app.core.config import settings
def verify_payme_auth(request: Request):
auth_header = request.headers.get("Authorization")
if not auth_header:
raise HTTPException(status_code=401, detail="Missing auth")
encoded = auth_header.split(" ")[1]
decoded = base64.b64decode(encoded).decode()
merchant_id, secret = decoded.split(":")
if merchant_id != settings.PAYME_MERCHANT_ID or secret != settings.PAYME_SECRET_KEY:
raise HTTPException(status_code=403, detail="Invalid Payme credentials")

0
app/db/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

Binary file not shown.

5
app/db/base.py Normal file
View File

@@ -0,0 +1,5 @@
from sqlalchemy.orm import DeclarativeBase
class Base(DeclarativeBase):
pass

13
app/db/session.py Normal file
View File

@@ -0,0 +1,13 @@
from sqlalchemy import create_engine
from sqlalchemy.orm import sessionmaker
from app.core.config import settings
engine = create_engine(settings.DATABASE_URL)
SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine)
def get_db():
db = SessionLocal()
try:
yield db
finally:
db.close()

13
app/main.py Normal file
View File

@@ -0,0 +1,13 @@
from fastapi import FastAPI
from app.api.shopify import router as shopify_router
from app.api.payme import router as payme_router
from app.db.base import Base
from app.db.session import engine
Base.metadata.create_all(bind=engine)
app = FastAPI()
app.include_router(shopify_router)
app.include_router(payme_router)
@app.get("/")
def root():
return {"message": "Service running"}

0
app/models/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

16
app/models/transaction.py Normal file
View File

@@ -0,0 +1,16 @@
from sqlalchemy import Column, Integer, String, BigInteger, DateTime
from sqlalchemy.sql import func
from app.db.base import Base
class Transaction(Base):
__tablename__ = "transactions"
id = Column(Integer, primary_key=True, index=True)
order_id = Column(String, nullable=False)
payme_transaction_id = Column(String, unique=True)
amount = Column(BigInteger, nullable=False)
state = Column(Integer, default=0)
created_at = Column(DateTime(timezone=True), server_default=func.now())
updated_at = Column(DateTime(timezone=True), onupdate=func.now())

0
app/schemas/__init__.py Normal file
View File

0
app/schemas/payme.py Normal file
View File

View File

0
app/services/__init__.py Normal file
View File

Binary file not shown.

Binary file not shown.

View File

@@ -0,0 +1,15 @@
import base64
import json
from app.core.config import settings
def generate_payme_checkout_url(order_id: int, amount: str):
data = {
"m": settings.PAYME_MERCHANT_ID,
"ac.order": str(order_id),
"a": int(float(amount) * 100),
}
encoded = base64.b64encode(json.dumps(data).encode()).decode()
return f"https://checkout.paycom.uz/{encoded}"

View File

@@ -0,0 +1,110 @@
import time
from sqlalchemy.orm import Session
from app.services.transaction_service import (
get_transaction_by_payme_id,
create_transaction,
update_transaction_state,
)
from app.services.shopify_service import mark_order_paid, get_shopify_order
from app.core.constants import (
STATE_CREATED,
STATE_COMPLETED,
STATE_CANCELLED,
ERROR_TRANSACTION_NOT_FOUND,
)
async def check_perform_transaction(params: dict) -> dict:
order_id = params["account"]["order"]
payme_amount = params["amount"] # tiyin
order = await get_shopify_order(order_id)
if not order:
return {"allow": False}
# Draft orders use "total_price", completed orders too — same field name
shopify_amount = int(float(order["total_price"]) * 100)
if shopify_amount != payme_amount:
return {"allow": False}
# Draft: status field is "status" not "financial_status"
if order.get("_is_draft"):
already_paid = order.get("status") == "completed"
else:
already_paid = order.get("financial_status") == "paid"
if already_paid:
return {"allow": False}
return {"allow": True}
async def create_transaction_handler(db: Session, params: dict) -> dict:
payme_id = params["id"]
order_id = params["account"]["order"]
amount = params["amount"]
existing = get_transaction_by_payme_id(db, payme_id)
if existing:
return {
"create_time": int(time.time() * 1000),
"transaction": payme_id,
"state": existing.state,
}
create_transaction(db, order_id, payme_id, amount)
return {
"create_time": int(time.time() * 1000),
"transaction": payme_id,
"state": STATE_CREATED,
}
async def perform_transaction_handler(db: Session, params: dict) -> dict | None:
payme_id = params["id"]
transaction = get_transaction_by_payme_id(db, payme_id)
if not transaction:
return None
if transaction.state == STATE_COMPLETED:
return {
"perform_time": int(time.time() * 1000),
"transaction": payme_id,
"state": STATE_COMPLETED,
}
update_transaction_state(db, transaction, STATE_COMPLETED)
# Fetch order to know if it's a draft
order = await get_shopify_order(transaction.order_id)
is_draft = order.get("_is_draft", False) if order else False
amount_uzs = str(transaction.amount / 100)
await mark_order_paid(transaction.order_id, amount_uzs, is_draft=is_draft)
return {
"perform_time": int(time.time() * 1000),
"transaction": payme_id,
"state": STATE_COMPLETED,
}
async def cancel_transaction_handler(db: Session, params: dict) -> dict | None:
payme_id = params["id"]
transaction = get_transaction_by_payme_id(db, payme_id)
if not transaction:
return None
update_transaction_state(db, transaction, STATE_CANCELLED)
return {
"cancel_time": int(time.time() * 1000),
"transaction": payme_id,
"state": STATE_CANCELLED,
}

View File

@@ -0,0 +1,63 @@
import httpx
from app.core.config import settings
SHOPIFY_API = f"https://{settings.SHOPIFY_STORE_URL}/admin/api/2024-01"
HEADERS = {
"X-Shopify-Access-Token": settings.SHOPIFY_ACCESS_TOKEN,
"Content-Type": "application/json",
}
async def get_shopify_order(order_id: str) -> dict | None:
"""
Tries regular orders first, falls back to draft orders.
Returns the order dict or None.
"""
async with httpx.AsyncClient() as client:
# 1. Try regular order
r = await client.get(f"{SHOPIFY_API}/orders/{order_id}.json", headers=HEADERS)
if r.status_code == 200:
order = r.json().get("order")
if order:
order["_is_draft"] = False
return order
# 2. Try draft order
r = await client.get(f"{SHOPIFY_API}/draft_orders/{order_id}.json", headers=HEADERS)
if r.status_code == 200:
order = r.json().get("draft_order")
if order:
order["_is_draft"] = True
return order
return None
async def mark_order_paid(order_id: str, amount: str, is_draft: bool = False) -> dict:
"""
For draft orders → complete the draft (converts it to a real order, marks paid).
For real orders → post a capture transaction.
"""
async with httpx.AsyncClient() as client:
if is_draft:
# Complete the draft order — this marks it as paid in Shopify
r = await client.post(
f"{SHOPIFY_API}/draft_orders/{order_id}/complete.json",
headers=HEADERS,
params={"payment_pending": False}, # False = mark as paid immediately
)
return r.json()
else:
# Regular order — post a capture transaction
r = await client.post(
f"{SHOPIFY_API}/orders/{order_id}/transactions.json",
headers=HEADERS,
json={
"transaction": {
"kind": "capture",
"status": "success",
"amount": amount,
}
},
)
return r.json()

View File

@@ -0,0 +1,29 @@
from sqlalchemy.orm import Session
from app.models.transaction import Transaction
from app.core.constants import *
def get_transaction_by_payme_id(db: Session, payme_id: str):
return db.query(Transaction).filter(
Transaction.payme_transaction_id == payme_id
).first()
def create_transaction(db: Session, order_id: str, payme_id: str, amount: int):
transaction = Transaction(
order_id=order_id,
payme_transaction_id=payme_id,
amount=amount,
state=STATE_CREATED,
)
db.add(transaction)
db.commit()
db.refresh(transaction)
return transaction
def update_transaction_state(db: Session, transaction: Transaction, state: int):
transaction.state = state
db.commit()
db.refresh(transaction)
return transaction

0
app/utils/__init__.py Normal file
View File

30
app/utils/get_token.py Normal file
View File

@@ -0,0 +1,30 @@
import webbrowser
import httpx
from urllib.parse import urlparse, parse_qs
CLIENT_ID = "5811038f7c170b60b93fca3727545e6f"
CLIENT_SECRET = input("Paste your Client Secret: ").strip()
STORE = "cx0du9-sq.myshopify.com"
auth_url = (
f"https://{STORE}/admin/oauth/authorize"
f"?client_id={CLIENT_ID}"
f"&scope=read_orders,write_orders,read_draft_orders,write_draft_orders,read_customers"
f"&redirect_uri=https://example.com"
f"&state=abc123"
)
print("\nOpening browser — click Allow...")
webbrowser.open(auth_url)
redirect_url = input("\nPaste the full redirect URL: ").strip()
code = parse_qs(urlparse(redirect_url).query)["code"][0]
response = httpx.post(
f"https://{STORE}/admin/oauth/access_token",
json={"client_id": CLIENT_ID, "client_secret": CLIENT_SECRET, "code": code},
)
data = response.json()
print("\n✅ Update your .env with this:")
print(f"SHOPIFY_ACCESS_TOKEN={data['access_token']}")

0
app/utils/helpers.py Normal file
View File

0
app/utils/logger.py Normal file
View File

29
docker-compose.yml Normal file
View File

@@ -0,0 +1,29 @@
version: "3.9"
services:
db:
image: postgres:15
container_name: payme_db
restart: always
environment:
POSTGRES_USER: payme_user
POSTGRES_PASSWORD: payme_pass
POSTGRES_DB: payme_db
ports:
- "5432:5432"
volumes:
- postgres_data:/var/lib/postgresql/data
app:
build: .
container_name: payme_app
restart: always
ports:
- "8000:8000"
env_file:
- .env
depends_on:
- db
volumes:
postgres_data:

9
requirements.txt Normal file
View File

@@ -0,0 +1,9 @@
fastapi
uvicorn[standard]
sqlalchemy
alembic
psycopg2-binary
httpx
pydantic-settings
python-dotenv
requests

31
testing.py Normal file
View File

@@ -0,0 +1,31 @@
import requests
SHOP = "cx0du9-sq.myshopify.com"
TOKEN = "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" # sizda bor token
VERSION = "2026-01"
def mark_order_paid(order_id, amount):
url = f"https://{SHOP}/admin/api/{VERSION}/orders/{order_id}/transactions.json"
payload = {
"transaction": {
"kind": "sale",
"source": "external",
"amount": amount
}
}
r = requests.post(
url,
headers={
"X-Shopify-Access-Token": TOKEN,
"Content-Type": "application/json"
},
json=payload
)
print(r.status_code, r.text)
mark_order_paid("1254611222844", 600000)

247
venv/bin/Activate.ps1 Normal file
View File

@@ -0,0 +1,247 @@
<#
.Synopsis
Activate a Python virtual environment for the current PowerShell session.
.Description
Pushes the python executable for a virtual environment to the front of the
$Env:PATH environment variable and sets the prompt to signify that you are
in a Python virtual environment. Makes use of the command line switches as
well as the `pyvenv.cfg` file values present in the virtual environment.
.Parameter VenvDir
Path to the directory that contains the virtual environment to activate. The
default value for this is the parent of the directory that the Activate.ps1
script is located within.
.Parameter Prompt
The prompt prefix to display when this virtual environment is activated. By
default, this prompt is the name of the virtual environment folder (VenvDir)
surrounded by parentheses and followed by a single space (ie. '(.venv) ').
.Example
Activate.ps1
Activates the Python virtual environment that contains the Activate.ps1 script.
.Example
Activate.ps1 -Verbose
Activates the Python virtual environment that contains the Activate.ps1 script,
and shows extra information about the activation as it executes.
.Example
Activate.ps1 -VenvDir C:\Users\MyUser\Common\.venv
Activates the Python virtual environment located in the specified location.
.Example
Activate.ps1 -Prompt "MyPython"
Activates the Python virtual environment that contains the Activate.ps1 script,
and prefixes the current prompt with the specified string (surrounded in
parentheses) while the virtual environment is active.
.Notes
On Windows, it may be required to enable this Activate.ps1 script by setting the
execution policy for the user. You can do this by issuing the following PowerShell
command:
PS C:\> Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
For more information on Execution Policies:
https://go.microsoft.com/fwlink/?LinkID=135170
#>
Param(
[Parameter(Mandatory = $false)]
[String]
$VenvDir,
[Parameter(Mandatory = $false)]
[String]
$Prompt
)
<# Function declarations --------------------------------------------------- #>
<#
.Synopsis
Remove all shell session elements added by the Activate script, including the
addition of the virtual environment's Python executable from the beginning of
the PATH variable.
.Parameter NonDestructive
If present, do not remove this function from the global namespace for the
session.
#>
function global:deactivate ([switch]$NonDestructive) {
# Revert to original values
# The prior prompt:
if (Test-Path -Path Function:_OLD_VIRTUAL_PROMPT) {
Copy-Item -Path Function:_OLD_VIRTUAL_PROMPT -Destination Function:prompt
Remove-Item -Path Function:_OLD_VIRTUAL_PROMPT
}
# The prior PYTHONHOME:
if (Test-Path -Path Env:_OLD_VIRTUAL_PYTHONHOME) {
Copy-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME -Destination Env:PYTHONHOME
Remove-Item -Path Env:_OLD_VIRTUAL_PYTHONHOME
}
# The prior PATH:
if (Test-Path -Path Env:_OLD_VIRTUAL_PATH) {
Copy-Item -Path Env:_OLD_VIRTUAL_PATH -Destination Env:PATH
Remove-Item -Path Env:_OLD_VIRTUAL_PATH
}
# Just remove the VIRTUAL_ENV altogether:
if (Test-Path -Path Env:VIRTUAL_ENV) {
Remove-Item -Path env:VIRTUAL_ENV
}
# Just remove VIRTUAL_ENV_PROMPT altogether.
if (Test-Path -Path Env:VIRTUAL_ENV_PROMPT) {
Remove-Item -Path env:VIRTUAL_ENV_PROMPT
}
# Just remove the _PYTHON_VENV_PROMPT_PREFIX altogether:
if (Get-Variable -Name "_PYTHON_VENV_PROMPT_PREFIX" -ErrorAction SilentlyContinue) {
Remove-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Scope Global -Force
}
# Leave deactivate function in the global namespace if requested:
if (-not $NonDestructive) {
Remove-Item -Path function:deactivate
}
}
<#
.Description
Get-PyVenvConfig parses the values from the pyvenv.cfg file located in the
given folder, and returns them in a map.
For each line in the pyvenv.cfg file, if that line can be parsed into exactly
two strings separated by `=` (with any amount of whitespace surrounding the =)
then it is considered a `key = value` line. The left hand string is the key,
the right hand is the value.
If the value starts with a `'` or a `"` then the first and last character is
stripped from the value before being captured.
.Parameter ConfigDir
Path to the directory that contains the `pyvenv.cfg` file.
#>
function Get-PyVenvConfig(
[String]
$ConfigDir
) {
Write-Verbose "Given ConfigDir=$ConfigDir, obtain values in pyvenv.cfg"
# Ensure the file exists, and issue a warning if it doesn't (but still allow the function to continue).
$pyvenvConfigPath = Join-Path -Resolve -Path $ConfigDir -ChildPath 'pyvenv.cfg' -ErrorAction Continue
# An empty map will be returned if no config file is found.
$pyvenvConfig = @{ }
if ($pyvenvConfigPath) {
Write-Verbose "File exists, parse `key = value` lines"
$pyvenvConfigContent = Get-Content -Path $pyvenvConfigPath
$pyvenvConfigContent | ForEach-Object {
$keyval = $PSItem -split "\s*=\s*", 2
if ($keyval[0] -and $keyval[1]) {
$val = $keyval[1]
# Remove extraneous quotations around a string value.
if ("'""".Contains($val.Substring(0, 1))) {
$val = $val.Substring(1, $val.Length - 2)
}
$pyvenvConfig[$keyval[0]] = $val
Write-Verbose "Adding Key: '$($keyval[0])'='$val'"
}
}
}
return $pyvenvConfig
}
<# Begin Activate script --------------------------------------------------- #>
# Determine the containing directory of this script
$VenvExecPath = Split-Path -Parent $MyInvocation.MyCommand.Definition
$VenvExecDir = Get-Item -Path $VenvExecPath
Write-Verbose "Activation script is located in path: '$VenvExecPath'"
Write-Verbose "VenvExecDir Fullname: '$($VenvExecDir.FullName)"
Write-Verbose "VenvExecDir Name: '$($VenvExecDir.Name)"
# Set values required in priority: CmdLine, ConfigFile, Default
# First, get the location of the virtual environment, it might not be
# VenvExecDir if specified on the command line.
if ($VenvDir) {
Write-Verbose "VenvDir given as parameter, using '$VenvDir' to determine values"
}
else {
Write-Verbose "VenvDir not given as a parameter, using parent directory name as VenvDir."
$VenvDir = $VenvExecDir.Parent.FullName.TrimEnd("\\/")
Write-Verbose "VenvDir=$VenvDir"
}
# Next, read the `pyvenv.cfg` file to determine any required value such
# as `prompt`.
$pyvenvCfg = Get-PyVenvConfig -ConfigDir $VenvDir
# Next, set the prompt from the command line, or the config file, or
# just use the name of the virtual environment folder.
if ($Prompt) {
Write-Verbose "Prompt specified as argument, using '$Prompt'"
}
else {
Write-Verbose "Prompt not specified as argument to script, checking pyvenv.cfg value"
if ($pyvenvCfg -and $pyvenvCfg['prompt']) {
Write-Verbose " Setting based on value in pyvenv.cfg='$($pyvenvCfg['prompt'])'"
$Prompt = $pyvenvCfg['prompt'];
}
else {
Write-Verbose " Setting prompt based on parent's directory's name. (Is the directory name passed to venv module when creating the virtual environment)"
Write-Verbose " Got leaf-name of $VenvDir='$(Split-Path -Path $venvDir -Leaf)'"
$Prompt = Split-Path -Path $venvDir -Leaf
}
}
Write-Verbose "Prompt = '$Prompt'"
Write-Verbose "VenvDir='$VenvDir'"
# Deactivate any currently active virtual environment, but leave the
# deactivate function in place.
deactivate -nondestructive
# Now set the environment variable VIRTUAL_ENV, used by many tools to determine
# that there is an activated venv.
$env:VIRTUAL_ENV = $VenvDir
if (-not $Env:VIRTUAL_ENV_DISABLE_PROMPT) {
Write-Verbose "Setting prompt to '$Prompt'"
# Set the prompt to include the env name
# Make sure _OLD_VIRTUAL_PROMPT is global
function global:_OLD_VIRTUAL_PROMPT { "" }
Copy-Item -Path function:prompt -Destination function:_OLD_VIRTUAL_PROMPT
New-Variable -Name _PYTHON_VENV_PROMPT_PREFIX -Description "Python virtual environment prompt prefix" -Scope Global -Option ReadOnly -Visibility Public -Value $Prompt
function global:prompt {
Write-Host -NoNewline -ForegroundColor Green "($_PYTHON_VENV_PROMPT_PREFIX) "
_OLD_VIRTUAL_PROMPT
}
$env:VIRTUAL_ENV_PROMPT = $Prompt
}
# Clear PYTHONHOME
if (Test-Path -Path Env:PYTHONHOME) {
Copy-Item -Path Env:PYTHONHOME -Destination Env:_OLD_VIRTUAL_PYTHONHOME
Remove-Item -Path Env:PYTHONHOME
}
# Add the venv to the PATH
Copy-Item -Path Env:PATH -Destination Env:_OLD_VIRTUAL_PATH
$Env:PATH = "$VenvExecDir$([System.IO.Path]::PathSeparator)$Env:PATH"

70
venv/bin/activate Normal file
View File

@@ -0,0 +1,70 @@
# This file must be used with "source bin/activate" *from bash*
# You cannot run it directly
deactivate () {
# reset old environment variables
if [ -n "${_OLD_VIRTUAL_PATH:-}" ] ; then
PATH="${_OLD_VIRTUAL_PATH:-}"
export PATH
unset _OLD_VIRTUAL_PATH
fi
if [ -n "${_OLD_VIRTUAL_PYTHONHOME:-}" ] ; then
PYTHONHOME="${_OLD_VIRTUAL_PYTHONHOME:-}"
export PYTHONHOME
unset _OLD_VIRTUAL_PYTHONHOME
fi
# Call hash to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
hash -r 2> /dev/null
if [ -n "${_OLD_VIRTUAL_PS1:-}" ] ; then
PS1="${_OLD_VIRTUAL_PS1:-}"
export PS1
unset _OLD_VIRTUAL_PS1
fi
unset VIRTUAL_ENV
unset VIRTUAL_ENV_PROMPT
if [ ! "${1:-}" = "nondestructive" ] ; then
# Self destruct!
unset -f deactivate
fi
}
# unset irrelevant variables
deactivate nondestructive
# on Windows, a path can contain colons and backslashes and has to be converted:
if [ "${OSTYPE:-}" = "cygwin" ] || [ "${OSTYPE:-}" = "msys" ] ; then
# transform D:\path\to\venv to /d/path/to/venv on MSYS
# and to /cygdrive/d/path/to/venv on Cygwin
export VIRTUAL_ENV=$(cygpath '/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv')
else
# use the path as-is
export VIRTUAL_ENV='/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv'
fi
_OLD_VIRTUAL_PATH="$PATH"
PATH="$VIRTUAL_ENV/"bin":$PATH"
export PATH
# unset PYTHONHOME if set
# this will fail if PYTHONHOME is set to the empty string (which is bad anyway)
# could use `if (set -u; : $PYTHONHOME) ;` in bash
if [ -n "${PYTHONHOME:-}" ] ; then
_OLD_VIRTUAL_PYTHONHOME="${PYTHONHOME:-}"
unset PYTHONHOME
fi
if [ -z "${VIRTUAL_ENV_DISABLE_PROMPT:-}" ] ; then
_OLD_VIRTUAL_PS1="${PS1:-}"
PS1='(venv) '"${PS1:-}"
export PS1
VIRTUAL_ENV_PROMPT='(venv) '
export VIRTUAL_ENV_PROMPT
fi
# Call hash to forget past commands. Without forgetting
# past commands the $PATH changes we made may not be respected
hash -r 2> /dev/null

27
venv/bin/activate.csh Normal file
View File

@@ -0,0 +1,27 @@
# This file must be used with "source bin/activate.csh" *from csh*.
# You cannot run it directly.
# Created by Davide Di Blasi <davidedb@gmail.com>.
# Ported to Python 3.3 venv by Andrew Svetlov <andrew.svetlov@gmail.com>
alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PATH" && unset _OLD_VIRTUAL_PATH; rehash; test $?_OLD_VIRTUAL_PROMPT != 0 && set prompt="$_OLD_VIRTUAL_PROMPT" && unset _OLD_VIRTUAL_PROMPT; unsetenv VIRTUAL_ENV; unsetenv VIRTUAL_ENV_PROMPT; test "\!:*" != "nondestructive" && unalias deactivate'
# Unset irrelevant variables.
deactivate nondestructive
setenv VIRTUAL_ENV '/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv'
set _OLD_VIRTUAL_PATH="$PATH"
setenv PATH "$VIRTUAL_ENV/"bin":$PATH"
set _OLD_VIRTUAL_PROMPT="$prompt"
if (! "$?VIRTUAL_ENV_DISABLE_PROMPT") then
set prompt = '(venv) '"$prompt"
setenv VIRTUAL_ENV_PROMPT '(venv) '
endif
alias pydoc python -m pydoc
rehash

69
venv/bin/activate.fish Normal file
View File

@@ -0,0 +1,69 @@
# This file must be used with "source <venv>/bin/activate.fish" *from fish*
# (https://fishshell.com/). You cannot run it directly.
function deactivate -d "Exit virtual environment and return to normal shell environment"
# reset old environment variables
if test -n "$_OLD_VIRTUAL_PATH"
set -gx PATH $_OLD_VIRTUAL_PATH
set -e _OLD_VIRTUAL_PATH
end
if test -n "$_OLD_VIRTUAL_PYTHONHOME"
set -gx PYTHONHOME $_OLD_VIRTUAL_PYTHONHOME
set -e _OLD_VIRTUAL_PYTHONHOME
end
if test -n "$_OLD_FISH_PROMPT_OVERRIDE"
set -e _OLD_FISH_PROMPT_OVERRIDE
# prevents error when using nested fish instances (Issue #93858)
if functions -q _old_fish_prompt
functions -e fish_prompt
functions -c _old_fish_prompt fish_prompt
functions -e _old_fish_prompt
end
end
set -e VIRTUAL_ENV
set -e VIRTUAL_ENV_PROMPT
if test "$argv[1]" != "nondestructive"
# Self-destruct!
functions -e deactivate
end
end
# Unset irrelevant variables.
deactivate nondestructive
set -gx VIRTUAL_ENV '/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv'
set -gx _OLD_VIRTUAL_PATH $PATH
set -gx PATH "$VIRTUAL_ENV/"bin $PATH
# Unset PYTHONHOME if set.
if set -q PYTHONHOME
set -gx _OLD_VIRTUAL_PYTHONHOME $PYTHONHOME
set -e PYTHONHOME
end
if test -z "$VIRTUAL_ENV_DISABLE_PROMPT"
# fish uses a function instead of an env var to generate the prompt.
# Save the current fish_prompt function as the function _old_fish_prompt.
functions -c fish_prompt _old_fish_prompt
# With the original prompt function renamed, we can override with our own.
function fish_prompt
# Save the return status of the last command.
set -l old_status $status
# Output the venv prompt; color taken from the blue of the Python logo.
printf "%s%s%s" (set_color 4B8BBE) '(venv) ' (set_color normal)
# Restore the return status of the previous command.
echo "exit $old_status" | .
# Output the original/"old" prompt.
_old_fish_prompt
end
set -gx _OLD_FISH_PROMPT_OVERRIDE "$VIRTUAL_ENV"
set -gx VIRTUAL_ENV_PROMPT '(venv) '
end

10
venv/bin/alembic Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python3" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from alembic.config import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

10
venv/bin/dotenv Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python3" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from dotenv.__main__ import cli
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(cli())

10
venv/bin/fastapi Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python3" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from fastapi.cli import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

10
venv/bin/httpx Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python3" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from httpx import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

10
venv/bin/mako-render Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python3" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from mako.cmd import cmdline
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(cmdline())

10
venv/bin/normalizer Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from charset_normalizer.cli import cli_detect
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(cli_detect())

10
venv/bin/pip Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

10
venv/bin/pip3 Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

10
venv/bin/pip3.12 Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from pip._internal.cli.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

1
venv/bin/python Symbolic link
View File

@@ -0,0 +1 @@
python3

1
venv/bin/python3 Symbolic link
View File

@@ -0,0 +1 @@
/usr/bin/python3

1
venv/bin/python3.12 Symbolic link
View File

@@ -0,0 +1 @@
python3

10
venv/bin/uvicorn Executable file
View File

@@ -0,0 +1,10 @@
#!/bin/sh
'''exec' "/home/abdulaziz/Desktop/New Projects/payme_shopify_service/venv/bin/python3" "$0" "$@"
' '''
# -*- coding: utf-8 -*-
import re
import sys
from uvicorn.main import main
if __name__ == '__main__':
sys.argv[0] = re.sub(r'(-script\.pyw|\.exe)?$', '', sys.argv[0])
sys.exit(main())

View File

@@ -0,0 +1,164 @@
/* -*- indent-tabs-mode: nil; tab-width: 4; -*- */
/* Greenlet object interface */
#ifndef Py_GREENLETOBJECT_H
#define Py_GREENLETOBJECT_H
#include <Python.h>
#ifdef __cplusplus
extern "C" {
#endif
/* This is deprecated and undocumented. It does not change. */
#define GREENLET_VERSION "1.0.0"
#ifndef GREENLET_MODULE
#define implementation_ptr_t void*
#endif
typedef struct _greenlet {
PyObject_HEAD
PyObject* weakreflist;
PyObject* dict;
implementation_ptr_t pimpl;
} PyGreenlet;
#define PyGreenlet_Check(op) (op && PyObject_TypeCheck(op, &PyGreenlet_Type))
/* C API functions */
/* Total number of symbols that are exported */
#define PyGreenlet_API_pointers 12
#define PyGreenlet_Type_NUM 0
#define PyExc_GreenletError_NUM 1
#define PyExc_GreenletExit_NUM 2
#define PyGreenlet_New_NUM 3
#define PyGreenlet_GetCurrent_NUM 4
#define PyGreenlet_Throw_NUM 5
#define PyGreenlet_Switch_NUM 6
#define PyGreenlet_SetParent_NUM 7
#define PyGreenlet_MAIN_NUM 8
#define PyGreenlet_STARTED_NUM 9
#define PyGreenlet_ACTIVE_NUM 10
#define PyGreenlet_GET_PARENT_NUM 11
#ifndef GREENLET_MODULE
/* This section is used by modules that uses the greenlet C API */
static void** _PyGreenlet_API = NULL;
# define PyGreenlet_Type \
(*(PyTypeObject*)_PyGreenlet_API[PyGreenlet_Type_NUM])
# define PyExc_GreenletError \
((PyObject*)_PyGreenlet_API[PyExc_GreenletError_NUM])
# define PyExc_GreenletExit \
((PyObject*)_PyGreenlet_API[PyExc_GreenletExit_NUM])
/*
* PyGreenlet_New(PyObject *args)
*
* greenlet.greenlet(run, parent=None)
*/
# define PyGreenlet_New \
(*(PyGreenlet * (*)(PyObject * run, PyGreenlet * parent)) \
_PyGreenlet_API[PyGreenlet_New_NUM])
/*
* PyGreenlet_GetCurrent(void)
*
* greenlet.getcurrent()
*/
# define PyGreenlet_GetCurrent \
(*(PyGreenlet * (*)(void)) _PyGreenlet_API[PyGreenlet_GetCurrent_NUM])
/*
* PyGreenlet_Throw(
* PyGreenlet *greenlet,
* PyObject *typ,
* PyObject *val,
* PyObject *tb)
*
* g.throw(...)
*/
# define PyGreenlet_Throw \
(*(PyObject * (*)(PyGreenlet * self, \
PyObject * typ, \
PyObject * val, \
PyObject * tb)) \
_PyGreenlet_API[PyGreenlet_Throw_NUM])
/*
* PyGreenlet_Switch(PyGreenlet *greenlet, PyObject *args)
*
* g.switch(*args, **kwargs)
*/
# define PyGreenlet_Switch \
(*(PyObject * \
(*)(PyGreenlet * greenlet, PyObject * args, PyObject * kwargs)) \
_PyGreenlet_API[PyGreenlet_Switch_NUM])
/*
* PyGreenlet_SetParent(PyObject *greenlet, PyObject *new_parent)
*
* g.parent = new_parent
*/
# define PyGreenlet_SetParent \
(*(int (*)(PyGreenlet * greenlet, PyGreenlet * nparent)) \
_PyGreenlet_API[PyGreenlet_SetParent_NUM])
/*
* PyGreenlet_GetParent(PyObject* greenlet)
*
* return greenlet.parent;
*
* This could return NULL even if there is no exception active.
* If it does not return NULL, you are responsible for decrementing the
* reference count.
*/
# define PyGreenlet_GetParent \
(*(PyGreenlet* (*)(PyGreenlet*)) \
_PyGreenlet_API[PyGreenlet_GET_PARENT_NUM])
/*
* deprecated, undocumented alias.
*/
# define PyGreenlet_GET_PARENT PyGreenlet_GetParent
# define PyGreenlet_MAIN \
(*(int (*)(PyGreenlet*)) \
_PyGreenlet_API[PyGreenlet_MAIN_NUM])
# define PyGreenlet_STARTED \
(*(int (*)(PyGreenlet*)) \
_PyGreenlet_API[PyGreenlet_STARTED_NUM])
# define PyGreenlet_ACTIVE \
(*(int (*)(PyGreenlet*)) \
_PyGreenlet_API[PyGreenlet_ACTIVE_NUM])
/* Macro that imports greenlet and initializes C API */
/* NOTE: This has actually moved to ``greenlet._greenlet._C_API``, but we
keep the older definition to be sure older code that might have a copy of
the header still works. */
# define PyGreenlet_Import() \
{ \
_PyGreenlet_API = (void**)PyCapsule_Import("greenlet._C_API", 0); \
}
#endif /* GREENLET_MODULE */
#ifdef __cplusplus
}
#endif
#endif /* !Py_GREENLETOBJECT_H */

View File

@@ -0,0 +1,139 @@
Metadata-Version: 2.4
Name: alembic
Version: 1.18.4
Summary: A database migration tool for SQLAlchemy.
Author-email: Mike Bayer <mike_mp@zzzcomputing.com>
License-Expression: MIT
Project-URL: Homepage, https://alembic.sqlalchemy.org
Project-URL: Documentation, https://alembic.sqlalchemy.org/en/latest/
Project-URL: Changelog, https://alembic.sqlalchemy.org/en/latest/changelog.html
Project-URL: Source, https://github.com/sqlalchemy/alembic/
Project-URL: Issue Tracker, https://github.com/sqlalchemy/alembic/issues/
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Environment :: Console
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Classifier: Topic :: Database :: Front-Ends
Requires-Python: >=3.10
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: SQLAlchemy>=1.4.23
Requires-Dist: Mako
Requires-Dist: typing-extensions>=4.12
Requires-Dist: tomli; python_version < "3.11"
Provides-Extra: tz
Requires-Dist: tzdata; extra == "tz"
Dynamic: license-file
Alembic is a database migrations tool written by the author
of `SQLAlchemy <http://www.sqlalchemy.org>`_. A migrations tool
offers the following functionality:
* Can emit ALTER statements to a database in order to change
the structure of tables and other constructs
* Provides a system whereby "migration scripts" may be constructed;
each script indicates a particular series of steps that can "upgrade" a
target database to a new version, and optionally a series of steps that can
"downgrade" similarly, doing the same steps in reverse.
* Allows the scripts to execute in some sequential manner.
The goals of Alembic are:
* Very open ended and transparent configuration and operation. A new
Alembic environment is generated from a set of templates which is selected
among a set of options when setup first occurs. The templates then deposit a
series of scripts that define fully how database connectivity is established
and how migration scripts are invoked; the migration scripts themselves are
generated from a template within that series of scripts. The scripts can
then be further customized to define exactly how databases will be
interacted with and what structure new migration files should take.
* Full support for transactional DDL. The default scripts ensure that all
migrations occur within a transaction - for those databases which support
this (Postgresql, Microsoft SQL Server), migrations can be tested with no
need to manually undo changes upon failure.
* Minimalist script construction. Basic operations like renaming
tables/columns, adding/removing columns, changing column attributes can be
performed through one line commands like alter_column(), rename_table(),
add_constraint(). There is no need to recreate full SQLAlchemy Table
structures for simple operations like these - the functions themselves
generate minimalist schema structures behind the scenes to achieve the given
DDL sequence.
* "auto generation" of migrations. While real world migrations are far more
complex than what can be automatically determined, Alembic can still
eliminate the initial grunt work in generating new migration directives
from an altered schema. The ``--autogenerate`` feature will inspect the
current status of a database using SQLAlchemy's schema inspection
capabilities, compare it to the current state of the database model as
specified in Python, and generate a series of "candidate" migrations,
rendering them into a new migration script as Python directives. The
developer then edits the new file, adding additional directives and data
migrations as needed, to produce a finished migration. Table and column
level changes can be detected, with constraints and indexes to follow as
well.
* Full support for migrations generated as SQL scripts. Those of us who
work in corporate environments know that direct access to DDL commands on a
production database is a rare privilege, and DBAs want textual SQL scripts.
Alembic's usage model and commands are oriented towards being able to run a
series of migrations into a textual output file as easily as it runs them
directly to a database. Care must be taken in this mode to not invoke other
operations that rely upon in-memory SELECTs of rows - Alembic tries to
provide helper constructs like bulk_insert() to help with data-oriented
operations that are compatible with script-based DDL.
* Non-linear, dependency-graph versioning. Scripts are given UUID
identifiers similarly to a DVCS, and the linkage of one script to the next
is achieved via human-editable markers within the scripts themselves.
The structure of a set of migration files is considered as a
directed-acyclic graph, meaning any migration file can be dependent
on any other arbitrary set of migration files, or none at
all. Through this open-ended system, migration files can be organized
into branches, multiple roots, and mergepoints, without restriction.
Commands are provided to produce new branches, roots, and merges of
branches automatically.
* Provide a library of ALTER constructs that can be used by any SQLAlchemy
application. The DDL constructs build upon SQLAlchemy's own DDLElement base
and can be used standalone by any application or script.
* At long last, bring SQLite and its inability to ALTER things into the fold,
but in such a way that SQLite's very special workflow needs are accommodated
in an explicit way that makes the most of a bad situation, through the
concept of a "batch" migration, where multiple changes to a table can
be batched together to form a series of instructions for a single, subsequent
"move-and-copy" workflow. You can even use "move-and-copy" workflow for
other databases, if you want to recreate a table in the background
on a busy system.
Documentation and status of Alembic is at https://alembic.sqlalchemy.org/
The SQLAlchemy Project
======================
Alembic is part of the `SQLAlchemy Project <https://www.sqlalchemy.org>`_ and
adheres to the same standards and conventions as the core project.
Development / Bug reporting / Pull requests
___________________________________________
Please refer to the
`SQLAlchemy Community Guide <https://www.sqlalchemy.org/develop.html>`_ for
guidelines on coding and participating in this project.
Code of Conduct
_______________
Above all, SQLAlchemy places great emphasis on polite, thoughtful, and
constructive communication between users and developers.
Please see our current Code of Conduct at
`Code of Conduct <https://www.sqlalchemy.org/codeofconduct.html>`_.
License
=======
Alembic is distributed under the `MIT license
<https://opensource.org/licenses/MIT>`_.

View File

@@ -0,0 +1,179 @@
../../../bin/alembic,sha256=MG45ZJz53mc5fAtG6DLoV11myuejaCGpb7KPIUfRLXk,307
alembic-1.18.4.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
alembic-1.18.4.dist-info/METADATA,sha256=sPH3Zq5eEaNtbnI1os9Rvk7eBbFJSMPq13poNNaxvfs,7217
alembic-1.18.4.dist-info/RECORD,,
alembic-1.18.4.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
alembic-1.18.4.dist-info/WHEEL,sha256=YCfwYGOYMi5Jhw2fU4yNgwErybb2IX5PEwBKV4ZbdBo,91
alembic-1.18.4.dist-info/entry_points.txt,sha256=aykM30soxwGN0pB7etLc1q0cHJbL9dy46RnK9VX4LLw,48
alembic-1.18.4.dist-info/licenses/LICENSE,sha256=bmjZSgOg4-Mn3fPobR6-3BTuzjkiAiYY_CRqNilv0Mw,1059
alembic-1.18.4.dist-info/top_level.txt,sha256=FwKWd5VsPFC8iQjpu1u9Cn-JnK3-V1RhUCmWqz1cl-s,8
alembic/__init__.py,sha256=6ppwNUS6dfdFIm5uwZaaZ9lDZ7pIwkTNyQcbjY47V3I,93
alembic/__main__.py,sha256=373m7-TBh72JqrSMYviGrxCHZo-cnweM8AGF8A22PmY,78
alembic/__pycache__/__init__.cpython-312.pyc,,
alembic/__pycache__/__main__.cpython-312.pyc,,
alembic/__pycache__/command.cpython-312.pyc,,
alembic/__pycache__/config.cpython-312.pyc,,
alembic/__pycache__/context.cpython-312.pyc,,
alembic/__pycache__/environment.cpython-312.pyc,,
alembic/__pycache__/migration.cpython-312.pyc,,
alembic/__pycache__/op.cpython-312.pyc,,
alembic/autogenerate/__init__.py,sha256=ntmUTXhjLm4_zmqIwyVaECdpPDn6_u1yM9vYk6-553E,543
alembic/autogenerate/__pycache__/__init__.cpython-312.pyc,,
alembic/autogenerate/__pycache__/api.cpython-312.pyc,,
alembic/autogenerate/__pycache__/render.cpython-312.pyc,,
alembic/autogenerate/__pycache__/rewriter.cpython-312.pyc,,
alembic/autogenerate/api.py,sha256=8tVNDSHlqsBgj1IVLdqvZr_jlvz9kp3O5EKIL9biaZg,22781
alembic/autogenerate/compare/__init__.py,sha256=kCvA0ZK0rTahNv9wlgyIB5DH2lFEhTRO4PFmoqcL9JE,1809
alembic/autogenerate/compare/__pycache__/__init__.cpython-312.pyc,,
alembic/autogenerate/compare/__pycache__/comments.cpython-312.pyc,,
alembic/autogenerate/compare/__pycache__/constraints.cpython-312.pyc,,
alembic/autogenerate/compare/__pycache__/schema.cpython-312.pyc,,
alembic/autogenerate/compare/__pycache__/server_defaults.cpython-312.pyc,,
alembic/autogenerate/compare/__pycache__/tables.cpython-312.pyc,,
alembic/autogenerate/compare/__pycache__/types.cpython-312.pyc,,
alembic/autogenerate/compare/__pycache__/util.cpython-312.pyc,,
alembic/autogenerate/compare/comments.py,sha256=agSrWsZhJ47i-E-EqiP3id2CXTTbP0muOKk1-9in9lg,3234
alembic/autogenerate/compare/constraints.py,sha256=7sLSvUK9M2CbMRRQy5pveIXbjDLRDnfPx0Dvi_KXOf8,27906
alembic/autogenerate/compare/schema.py,sha256=plQ7JJ1zJGlnajweSV8lAD9tDYPks5G40sliocTuXJA,1695
alembic/autogenerate/compare/server_defaults.py,sha256=D--5EvEfyX0fSVkK6iLtRoer5sYK6xeNC2TIdu7klUk,10792
alembic/autogenerate/compare/tables.py,sha256=47pAgVhbmXGLrm3dMK6hrNABxOAe_cGSQmPtCBwORVc,10611
alembic/autogenerate/compare/types.py,sha256=75bOduz-dOiyLI065XD5sEP_JF9GPLkDAQ_y5B8lXF0,4005
alembic/autogenerate/compare/util.py,sha256=K_GArJ2xQXZi6ftb8gkgZuIdVqvyep3E2ZXq8F3-jIU,9521
alembic/autogenerate/render.py,sha256=ceQL8nk8m2kBtQq5gtxtDLR9iR0Sck8xG_61Oez-Sqs,37270
alembic/autogenerate/rewriter.py,sha256=NIASSS-KaNKPmbm1k4pE45aawwjSh1Acf6eZrOwnUGM,7814
alembic/command.py,sha256=7RzAwwXR31sOl0oVItyZl9B0j3TeR5dRyx9634lVsLM,25297
alembic/config.py,sha256=VoCZV2cFZoF0Xa1OxHqsA-MKzuwBRaJSC7hxZ3-uWN4,34983
alembic/context.py,sha256=hK1AJOQXJ29Bhn276GYcosxeG7pC5aZRT5E8c4bMJ4Q,195
alembic/context.pyi,sha256=b_naI_W8dyiZRsL_n299a-LbqLZxKTAgDIXubRLVKlY,32531
alembic/ddl/__init__.py,sha256=Df8fy4Vn_abP8B7q3x8gyFwEwnLw6hs2Ljt_bV3EZWE,152
alembic/ddl/__pycache__/__init__.cpython-312.pyc,,
alembic/ddl/__pycache__/_autogen.cpython-312.pyc,,
alembic/ddl/__pycache__/base.cpython-312.pyc,,
alembic/ddl/__pycache__/impl.cpython-312.pyc,,
alembic/ddl/__pycache__/mssql.cpython-312.pyc,,
alembic/ddl/__pycache__/mysql.cpython-312.pyc,,
alembic/ddl/__pycache__/oracle.cpython-312.pyc,,
alembic/ddl/__pycache__/postgresql.cpython-312.pyc,,
alembic/ddl/__pycache__/sqlite.cpython-312.pyc,,
alembic/ddl/_autogen.py,sha256=Blv2RrHNyF4cE6znCQXNXG5T9aO-YmiwD4Fz-qfoaWA,9275
alembic/ddl/base.py,sha256=dNhLIZnFMP7Cr8rE_e2Zb5skGgCMBOdca1PajXqZYhs,11977
alembic/ddl/impl.py,sha256=IU3yHFVI3v0QHEwNL_LSN1PRpPF0n09NFFqRZkW86wE,31376
alembic/ddl/mssql.py,sha256=dee0acwnxmTZXuYPqqlYaDiSbKS46zVH0WRULjX5Blg,17398
alembic/ddl/mysql.py,sha256=2fvzGcdg4qqCJogGnzvQN636vUi9mF6IoQWLGevvF_A,18456
alembic/ddl/oracle.py,sha256=669YlkcZihlXFbnXhH2krdrvDry8q5pcUGfoqkg_R6Y,6243
alembic/ddl/postgresql.py,sha256=04M4OpZOCJJ3ipuHoVwlR1gI1sgRwOguRRVx_mFg8Uc,30417
alembic/ddl/sqlite.py,sha256=TmzU3YaR3aw_0spSrA6kcUY8fyDfwsu4GkH5deYPEK8,8017
alembic/environment.py,sha256=MM5lPayGT04H3aeng1H7GQ8HEAs3VGX5yy6mDLCPLT4,43
alembic/migration.py,sha256=MV6Fju6rZtn2fTREKzXrCZM6aIBGII4OMZFix0X-GLs,41
alembic/op.py,sha256=flHtcsVqOD-ZgZKK2pv-CJ5Cwh-KJ7puMUNXzishxLw,167
alembic/op.pyi,sha256=ABBlNk4Eg7DR17knSKIjmvHQBNAmKh3aHQNHU8Oyw08,53347
alembic/operations/__init__.py,sha256=e0KQSZAgLpTWvyvreB7DWg7RJV_MWSOPVDgCqsd2FzY,318
alembic/operations/__pycache__/__init__.cpython-312.pyc,,
alembic/operations/__pycache__/base.cpython-312.pyc,,
alembic/operations/__pycache__/batch.cpython-312.pyc,,
alembic/operations/__pycache__/ops.cpython-312.pyc,,
alembic/operations/__pycache__/schemaobj.cpython-312.pyc,,
alembic/operations/__pycache__/toimpl.cpython-312.pyc,,
alembic/operations/base.py,sha256=ubpv1HDol0g0nuLi0b8-uN7-HEVRZ6mq8arvK9EGo0g,78432
alembic/operations/batch.py,sha256=hYOpzG2FK_8hk-rHNuLuFAA3-VXRSOnsTrpz2YlA61Q,26947
alembic/operations/ops.py,sha256=ofbHkReZkZX2n9lXDaIPlrKe2U1mwgQpZNhEbuC4QrM,99325
alembic/operations/schemaobj.py,sha256=Wp-bBe4a8lXPTvIHJttBY0ejtpVR5Jvtb2kI-U2PztQ,9468
alembic/operations/toimpl.py,sha256=f8rH3jdob9XvEJr6CoWEkX6X1zgNB5qxdcEQugyhBvU,8466
alembic/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
alembic/runtime/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
alembic/runtime/__pycache__/__init__.cpython-312.pyc,,
alembic/runtime/__pycache__/environment.cpython-312.pyc,,
alembic/runtime/__pycache__/migration.cpython-312.pyc,,
alembic/runtime/__pycache__/plugins.cpython-312.pyc,,
alembic/runtime/environment.py,sha256=1cR1v18sIKvOPZMlc4fHGU4J8r6Dec9h4o3WXkMmFKQ,42400
alembic/runtime/migration.py,sha256=mR2Ee1h9Yy6OMFeDL4LOYorLYby2l2f899WGK_boECw,48427
alembic/runtime/plugins.py,sha256=pWCDhMX8MvR8scXhiGSRNYNW7-ckEbOW2qK58xRFy1Q,5707
alembic/script/__init__.py,sha256=lSj06O391Iy5avWAiq8SPs6N8RBgxkSPjP8wpXcNDGg,100
alembic/script/__pycache__/__init__.cpython-312.pyc,,
alembic/script/__pycache__/base.cpython-312.pyc,,
alembic/script/__pycache__/revision.cpython-312.pyc,,
alembic/script/__pycache__/write_hooks.cpython-312.pyc,,
alembic/script/base.py,sha256=OInSjbfcnUSjVCc5vVYY33UJ1Uo5xE5Huicp8P9VM1I,36698
alembic/script/revision.py,sha256=SEePZPTMIyfjF73QAD0VIax9jc1dALkiLQZwTzwiyPw,62312
alembic/script/write_hooks.py,sha256=KWH12250h_JcdBkGsLVo9JKYKpNcJxBUjwZ9r_r88Bc,5369
alembic/templates/async/README,sha256=ISVtAOvqvKk_5ThM5ioJE-lMkvf9IbknFUFVU_vPma4,58
alembic/templates/async/__pycache__/env.cpython-312.pyc,,
alembic/templates/async/alembic.ini.mako,sha256=esbuCnpkyjntJC7k9NnYcCAzhrRQ8NVC4pWineiRk_w,5010
alembic/templates/async/env.py,sha256=zbOCf3Y7w2lg92hxSwmG1MM_7y56i_oRH4AKp0pQBYo,2389
alembic/templates/async/script.py.mako,sha256=04kgeBtNMa4cCnG8CfQcKt6P6rnloIfj8wy0u_DBydM,704
alembic/templates/generic/README,sha256=MVlc9TYmr57RbhXET6QxgyCcwWP7w-vLkEsirENqiIQ,38
alembic/templates/generic/__pycache__/env.cpython-312.pyc,,
alembic/templates/generic/alembic.ini.mako,sha256=2i2vPsGQSmE9XMiLz8tSBF_UIA8PJl0-fAvbRVmiK_w,5010
alembic/templates/generic/env.py,sha256=TLRWOVW3Xpt_Tpf8JFzlnoPn_qoUu8UV77Y4o9XD6yI,2103
alembic/templates/generic/script.py.mako,sha256=04kgeBtNMa4cCnG8CfQcKt6P6rnloIfj8wy0u_DBydM,704
alembic/templates/multidb/README,sha256=dWLDhnBgphA4Nzb7sNlMfCS3_06YqVbHhz-9O5JNqyI,606
alembic/templates/multidb/__pycache__/env.cpython-312.pyc,,
alembic/templates/multidb/alembic.ini.mako,sha256=asVt3aJVwjuuw9bopfMofVvonO31coXBbV5DeMRN6cM,5336
alembic/templates/multidb/env.py,sha256=6zNjnW8mXGUk7erTsAvrfhvqoczJ-gagjVq1Ypg2YIQ,4230
alembic/templates/multidb/script.py.mako,sha256=ZbCXMkI5Wj2dwNKcxuVGkKZ7Iav93BNx_bM4zbGi3c8,1235
alembic/templates/pyproject/README,sha256=dMhIiFoeM7EdeaOXBs3mVQ6zXACMyGXDb_UBB6sGRA0,60
alembic/templates/pyproject/__pycache__/env.cpython-312.pyc,,
alembic/templates/pyproject/alembic.ini.mako,sha256=bQnEoydnLOUgg9vNbTOys4r5MaW8lmwYFXSrlfdEEkw,782
alembic/templates/pyproject/env.py,sha256=TLRWOVW3Xpt_Tpf8JFzlnoPn_qoUu8UV77Y4o9XD6yI,2103
alembic/templates/pyproject/pyproject.toml.mako,sha256=W6x_K-xLfEvyM8D4B3Fg0l20P1h6SPK33188pqRFroQ,3000
alembic/templates/pyproject/script.py.mako,sha256=04kgeBtNMa4cCnG8CfQcKt6P6rnloIfj8wy0u_DBydM,704
alembic/templates/pyproject_async/README,sha256=2Q5XcEouiqQ-TJssO9805LROkVUd0F6d74rTnuLrifA,45
alembic/templates/pyproject_async/__pycache__/env.cpython-312.pyc,,
alembic/templates/pyproject_async/alembic.ini.mako,sha256=bQnEoydnLOUgg9vNbTOys4r5MaW8lmwYFXSrlfdEEkw,782
alembic/templates/pyproject_async/env.py,sha256=zbOCf3Y7w2lg92hxSwmG1MM_7y56i_oRH4AKp0pQBYo,2389
alembic/templates/pyproject_async/pyproject.toml.mako,sha256=W6x_K-xLfEvyM8D4B3Fg0l20P1h6SPK33188pqRFroQ,3000
alembic/templates/pyproject_async/script.py.mako,sha256=04kgeBtNMa4cCnG8CfQcKt6P6rnloIfj8wy0u_DBydM,704
alembic/testing/__init__.py,sha256=PTMhi_2PZ1T_3atQS2CIr0V4YRZzx_doKI-DxKdQS44,1297
alembic/testing/__pycache__/__init__.cpython-312.pyc,,
alembic/testing/__pycache__/assertions.cpython-312.pyc,,
alembic/testing/__pycache__/env.cpython-312.pyc,,
alembic/testing/__pycache__/fixtures.cpython-312.pyc,,
alembic/testing/__pycache__/requirements.cpython-312.pyc,,
alembic/testing/__pycache__/schemacompare.cpython-312.pyc,,
alembic/testing/__pycache__/util.cpython-312.pyc,,
alembic/testing/__pycache__/warnings.cpython-312.pyc,,
alembic/testing/assertions.py,sha256=VKXMEVWjuPAsYnNxP3WnUpXaFN3ytNFf9LI72OEJ074,5344
alembic/testing/env.py,sha256=oQN56xXHtHfK8RD-8pH8yZ-uWcjpuNL1Mt5HNrzZyc0,12151
alembic/testing/fixtures.py,sha256=meqm10rd1ynppW6tw1wcpDJJLyQezZ7FwKyqcrwIOok,11931
alembic/testing/plugin/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
alembic/testing/plugin/__pycache__/__init__.cpython-312.pyc,,
alembic/testing/plugin/__pycache__/bootstrap.cpython-312.pyc,,
alembic/testing/plugin/bootstrap.py,sha256=9C6wtjGrIVztZ928w27hsQE0KcjDLIUtUN3dvZKsMVk,50
alembic/testing/requirements.py,sha256=OZSHd8I3zOb7288cZxUTebqxx8j0T6I8MekH15TyPvY,4566
alembic/testing/schemacompare.py,sha256=N5UqSNCOJetIKC4vKhpYzQEpj08XkdgIoqBmEPQ3tlc,4838
alembic/testing/suite/__init__.py,sha256=MvE7-hwbaVN1q3NM-ztGxORU9dnIelUCINKqNxewn7Y,288
alembic/testing/suite/__pycache__/__init__.cpython-312.pyc,,
alembic/testing/suite/__pycache__/_autogen_fixtures.cpython-312.pyc,,
alembic/testing/suite/__pycache__/test_autogen_comments.cpython-312.pyc,,
alembic/testing/suite/__pycache__/test_autogen_computed.cpython-312.pyc,,
alembic/testing/suite/__pycache__/test_autogen_diffs.cpython-312.pyc,,
alembic/testing/suite/__pycache__/test_autogen_fks.cpython-312.pyc,,
alembic/testing/suite/__pycache__/test_autogen_identity.cpython-312.pyc,,
alembic/testing/suite/__pycache__/test_environment.cpython-312.pyc,,
alembic/testing/suite/__pycache__/test_op.cpython-312.pyc,,
alembic/testing/suite/_autogen_fixtures.py,sha256=3nNTd8iDeVeSgpPIj8KAraNbU-PkJtxDb4X_TVsZ528,14200
alembic/testing/suite/test_autogen_comments.py,sha256=aEGqKUDw4kHjnDk298aoGcQvXJWmZXcIX_2FxH4cJK8,6283
alembic/testing/suite/test_autogen_computed.py,sha256=puJ0hBtLzNz8LiPGqDPS8vse6dUS9VCBpUdw-cOksZo,4554
alembic/testing/suite/test_autogen_diffs.py,sha256=T4SR1n_kmcOKYhR4W1-dA0e5sddJ69DSVL2HW96kAkE,8394
alembic/testing/suite/test_autogen_fks.py,sha256=wHKjD4Egf7IZlH0HYw-c8uti0jhJpOm5K42QMXf5tIw,32930
alembic/testing/suite/test_autogen_identity.py,sha256=kcuqngG7qXAKPJDX4U8sRzPKHEJECHuZ0DtuaS6tVkk,5824
alembic/testing/suite/test_environment.py,sha256=OwD-kpESdLoc4byBrGrXbZHvqtPbzhFCG4W9hJOJXPQ,11877
alembic/testing/suite/test_op.py,sha256=2XQCdm_NmnPxHGuGj7hmxMzIhKxXNotUsKdACXzE1mM,1343
alembic/testing/util.py,sha256=CQrcQDA8fs_7ME85z5ydb-Bt70soIIID-qNY1vbR2dg,3350
alembic/testing/warnings.py,sha256=cDDWzvxNZE6x9dME2ACTXSv01G81JcIbE1GIE_s1kvg,831
alembic/util/__init__.py,sha256=xNpZtajyTF4eVEbLj0Pcm2FbNkIZD_pCvKGKSPucTEs,1777
alembic/util/__pycache__/__init__.cpython-312.pyc,,
alembic/util/__pycache__/compat.cpython-312.pyc,,
alembic/util/__pycache__/editor.cpython-312.pyc,,
alembic/util/__pycache__/exc.cpython-312.pyc,,
alembic/util/__pycache__/langhelpers.cpython-312.pyc,,
alembic/util/__pycache__/messaging.cpython-312.pyc,,
alembic/util/__pycache__/pyfiles.cpython-312.pyc,,
alembic/util/__pycache__/sqla_compat.cpython-312.pyc,,
alembic/util/compat.py,sha256=NytmcsMtK8WEEVwWc-ZWYlSOi55BtRlmJXjxnF3nsh8,3810
alembic/util/editor.py,sha256=JIz6_BdgV8_oKtnheR6DZoB7qnrHrlRgWjx09AsTsUw,2546
alembic/util/exc.py,sha256=SublpLmAeAW8JeEml-1YyhIjkSORTkZbvHVVJeoPymg,993
alembic/util/langhelpers.py,sha256=GBbR01xNi1kmz8W37h0NzXl3hBC1SY7k7Bj-h5jVgps,13164
alembic/util/messaging.py,sha256=3bEBoDy4EAXETXAvArlYjeMITXDTgPTu6ZoE3ytnzSw,3294
alembic/util/pyfiles.py,sha256=QUZYc5kE3Z7nV64PblcRffzA7VfVaiFB2x3vtcG0_AE,4707
alembic/util/sqla_compat.py,sha256=llgJVtOsO1c3euS9_peORZkM9QeSvQWa-1LNHqrzEM4,15246

View File

@@ -0,0 +1,5 @@
Wheel-Version: 1.0
Generator: setuptools (82.0.0)
Root-Is-Purelib: true
Tag: py3-none-any

View File

@@ -0,0 +1,2 @@
[console_scripts]
alembic = alembic.config:main

View File

@@ -0,0 +1,19 @@
Copyright 2009-2026 Michael Bayer.
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is furnished to do
so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -0,0 +1 @@
alembic

View File

@@ -0,0 +1,6 @@
from . import context
from . import op
from .runtime import plugins
__version__ = "1.18.4"

View File

@@ -0,0 +1,4 @@
from .config import main
if __name__ == "__main__":
main(prog="alembic")

Some files were not shown because too many files have changed in this diff Show More