1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 poetry-core,
6 pydantic,
7 typing-extensions,
8 websockets,
9 aiohttp,
10 pytest-asyncio,
11 pytestCheckHook,
12 python-dotenv,
13}:
14
15buildPythonPackage rec {
16 pname = "realtime-py";
17 version = "2.7.0";
18 pyproject = true;
19
20 src = fetchFromGitHub {
21 owner = "supabase";
22 repo = "realtime-py";
23 tag = "v${version}";
24 hash = "sha256-cWWgVs+ZNRvBje3kuDQS5L5utkY3z7MluGFNmjf9LFc=";
25 };
26
27 dependencies = [
28 pydantic
29 typing-extensions
30 websockets
31 ];
32
33 pythonRelaxDeps = [
34 "websockets"
35 ];
36
37 nativeCheckInputs = [
38 aiohttp
39 pytest-asyncio
40 pytestCheckHook
41 python-dotenv
42 ];
43
44 pythonImportsCheck = [ "realtime" ];
45
46 build-system = [ poetry-core ];
47
48 # requires running Supabase
49 doCheck = false;
50
51 meta = {
52 changelog = "https://github.com/supabase/realtime-py/blob/${src.tag}/CHANGELOG.md";
53 homepage = "https://github.com/supabase/realtime-py";
54 license = lib.licenses.mit;
55 description = "Python Realtime Client for Supabase";
56 maintainers = with lib.maintainers; [ siegema ];
57 };
58}