nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 aiosqlite,
4 beautifulsoup4,
5 buildPythonPackage,
6 fake-useragent,
7 fetchFromGitHub,
8 hatchling,
9 httpx,
10 loguru,
11 pyotp,
12 pytestCheckHook,
13 pytest-asyncio,
14 pytest-httpx,
15}:
16
17buildPythonPackage rec {
18 pname = "twscrape";
19 version = "0.17.0";
20 pyproject = true;
21
22 src = fetchFromGitHub {
23 owner = "vladkens";
24 repo = "twscrape";
25 tag = "v${version}";
26 hash = "sha256-0j6nE8V0CWTuIHMS+2p5Ncz7d+D6VagjtyfMbQuI8Eg=";
27 };
28
29 build-system = [ hatchling ];
30
31 pythonRelaxDeps = [ "beautifulsoup4" ];
32
33 dependencies = [
34 aiosqlite
35 beautifulsoup4
36 fake-useragent
37 httpx
38 loguru
39 pyotp
40 ];
41
42 nativeCheckInputs = [
43 pytestCheckHook
44 pytest-asyncio
45 pytest-httpx
46 ];
47
48 pythonImportsCheck = [ "twscrape" ];
49
50 meta = {
51 description = "Twitter API scrapper with authorization support";
52 homepage = "https://github.com/vladkens/twscrape";
53 changelog = "https://github.com/vladkens/twscrape/releases/tag/v${version}";
54 license = lib.licenses.mit;
55 maintainers = [ lib.maintainers.amadejkastelic ];
56 };
57}