Catalog PyPI
PACKAGE EXPLORERView in registry

aiocrystal

PyPI

crystlpay easy interaction

Versions collected1
Direct dependencies5From release 0.1.1
Last observed21 Oct, 11:47 UTC

README

Version 0.1.1 documentation

Библиотека полностью повтраяет структуру вложоности https://docs.crystalpay.io/

Создания счета & проверка(не рекомендуеться иза лимита)

from aiocrystal import CrystalPay
from aiocrystal.utils.types import InvoiceState
import asyncio

cp=CrystalPay(auth_login='name',
              auth_secret='Secret',
              salt='salt'
              )

async def main():
    invoice=await cp.invoice.create(amount=100, description='aiocrystal<3')
    invoice_id=invoice.id
    print(invoice.url)
    while True:
        invoice_state=(await cp.invoice.info(invoice_id)).state
        if InvoiceState.payed == invoice_state:
            print('Succes')
            break
        await asyncio.sleep(5)


asyncio.run(main())

WebHook Fastapi & пример фильтров

from typing import Union

from fastapi import FastAPI

from aiocrystal.v3.async_crystal import CrystalPay
from aiocrystal.utils.types import CallbackInvoice, InvoiceState
from aiocrystal.webhook import FastApiManager

import uvicorn
import asyncio

host=''

app = FastAPI()

cp=CrystalPay(auth_login='name',
     auth_secret='Secret',
     salt='Salt',
     webhook_manager=FastApiManager(
        app_fastapi=app,
        end_point_invoice='/pay/crystalpay'
     )
     )
# пример фильтрации
async def IsPayed(invoice: CallbackInvoice): 
    return invoice.rub_amount >= 100 

async def AntiUnavailableIsPayed(invoice: CallbackInvoice):
    return invoice.state == InvoiceState.payed

@cp.callback_invoice(IsPayed, AntiUnavailableIsPayed) #<- вохможность добавлять несколько фильтров
async def pay_cp(invoice: CallbackInvoice):
    print(f'Пришло: {invoice.rub_amount}')

async def main():
    invoice=await cp.invoice.create(100, callback_url=f'{host}/pay/crystalpay')
    print(invoice.url)


asyncio.run(main())

uvicorn.run(app, host="localhost", port=5000)

Downloads & popularity

1downloads
1-day window · source-reported counts20 Oct 2026
52.50
2026-07-23: 3 · observed 2026-10-21T16:06:35.3807671Z · period 2026-07-23–2026-07-232026-07-27: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-07-27–2026-07-272026-07-28: 4 · observed 2026-10-21T16:06:35.3807671Z · period 2026-07-28–2026-07-282026-07-30: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-07-30–2026-07-302026-07-31: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-07-31–2026-07-312026-08-01: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-01–2026-08-012026-08-02: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-02–2026-08-022026-08-04: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-04–2026-08-042026-08-09: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-09–2026-08-092026-08-14: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-14–2026-08-142026-08-15: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-15–2026-08-152026-08-17: 3 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-17–2026-08-172026-08-19: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-19–2026-08-192026-08-21: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-21–2026-08-212026-08-23: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-23–2026-08-232026-08-24: 4 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-24–2026-08-242026-08-25: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-25–2026-08-252026-08-31: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-08-31–2026-08-312026-09-01: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-09-01–2026-09-012026-09-07: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-09-07–2026-09-072026-09-12: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-09-12–2026-09-122026-09-21: 3 · observed 2026-10-21T16:06:35.3807671Z · period 2026-09-21–2026-09-212026-09-26: 5 · observed 2026-10-21T16:06:35.3807671Z · period 2026-09-26–2026-09-262026-09-27: 3 · observed 2026-10-21T16:06:35.3807671Z · period 2026-09-27–2026-09-272026-09-29: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-09-29–2026-09-292026-09-30: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-09-30–2026-09-302026-10-02: 2 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-02–2026-10-022026-10-03: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-03–2026-10-032026-10-06: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-06–2026-10-062026-10-10: 4 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-10–2026-10-102026-10-13: 5 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-13–2026-10-132026-10-16: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-16–2026-10-162026-10-17: 3 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-17–2026-10-172026-10-19: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-19–2026-10-192026-10-20: 1 · observed 2026-10-21T16:06:35.3807671Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 35 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2012026-10-21T16:06:35.3807671Z
2026-10-19 – 2026-10-1912026-10-21T16:06:35.3807671Z
2026-10-17 – 2026-10-1732026-10-21T16:06:35.3807671Z
2026-10-16 – 2026-10-1612026-10-21T16:06:35.3807671Z
2026-10-13 – 2026-10-1352026-10-21T16:06:35.3807671Z
2026-10-10 – 2026-10-1042026-10-21T16:06:35.3807671Z
2026-10-06 – 2026-10-0612026-10-21T16:06:35.3807671Z
2026-10-03 – 2026-10-0312026-10-21T16:06:35.3807671Z
2026-10-02 – 2026-10-0222026-10-21T16:06:35.3807671Z
2026-09-30 – 2026-09-3012026-10-21T16:06:35.3807671Z
2026-09-29 – 2026-09-2922026-10-21T16:06:35.3807671Z
2026-09-27 – 2026-09-2732026-10-21T16:06:35.3807671Z
2026-09-26 – 2026-09-2652026-10-21T16:06:35.3807671Z
2026-09-21 – 2026-09-2132026-10-21T16:06:35.3807671Z
2026-09-12 – 2026-09-1212026-10-21T16:06:35.3807671Z
2026-09-07 – 2026-09-0712026-10-21T16:06:35.3807671Z
2026-09-01 – 2026-09-0112026-10-21T16:06:35.3807671Z
2026-08-31 – 2026-08-3112026-10-21T16:06:35.3807671Z
2026-08-25 – 2026-08-2512026-10-21T16:06:35.3807671Z
2026-08-24 – 2026-08-2442026-10-21T16:06:35.3807671Z
2026-08-23 – 2026-08-2312026-10-21T16:06:35.3807671Z
2026-08-21 – 2026-08-2112026-10-21T16:06:35.3807671Z
2026-08-19 – 2026-08-1922026-10-21T16:06:35.3807671Z
2026-08-17 – 2026-08-1732026-10-21T16:06:35.3807671Z
2026-08-15 – 2026-08-1522026-10-21T16:06:35.3807671Z
2026-08-14 – 2026-08-1422026-10-21T16:06:35.3807671Z
2026-08-09 – 2026-08-0922026-10-21T16:06:35.3807671Z
2026-08-04 – 2026-08-0412026-10-21T16:06:35.3807671Z
2026-08-02 – 2026-08-0222026-10-21T16:06:35.3807671Z
2026-08-01 – 2026-08-0112026-10-21T16:06:35.3807671Z
2026-07-31 – 2026-07-3112026-10-21T16:06:35.3807671Z
2026-07-30 – 2026-07-3022026-10-21T16:06:35.3807671Z
2026-07-28 – 2026-07-2842026-10-21T16:06:35.3807671Z
2026-07-27 – 2026-07-2722026-10-21T16:06:35.3807671Z
2026-07-23 – 2026-07-2332026-10-21T16:06:35.3807671Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.113 Mar 20255

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Metadata history

Meaningful changes
Current collected state Current

Observed since 21 Oct, 11:47 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:2adc1a3b70649ad75ba7f4d6222ad30db0ed554eeb9bf96075d876d14ec02bb0