defillama-sdk 0.1.0__tar.gz → 0.1.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. {defillama_sdk-0.1.0/defillama_sdk.egg-info → defillama_sdk-0.1.2}/PKG-INFO +7 -7
  2. {defillama_sdk-0.1.0 → defillama_sdk-0.1.2}/README.md +6 -6
  3. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/fees.py +6 -8
  4. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/volumes.py +9 -12
  5. {defillama_sdk-0.1.0 → defillama_sdk-0.1.2/defillama_sdk.egg-info}/PKG-INFO +7 -7
  6. defillama_sdk-0.1.2/defillama_sdk.egg-info/SOURCES.txt +41 -0
  7. defillama_sdk-0.1.2/defillama_sdk.egg-info/top_level.txt +1 -0
  8. {defillama_sdk-0.1.0 → defillama_sdk-0.1.2}/pyproject.toml +6 -6
  9. defillama_sdk-0.1.0/defillama_sdk.egg-info/SOURCES.txt +0 -41
  10. defillama_sdk-0.1.0/defillama_sdk.egg-info/top_level.txt +0 -1
  11. {defillama_sdk-0.1.0 → defillama_sdk-0.1.2}/LICENSE +0 -0
  12. {defillama_sdk-0.1.0 → defillama_sdk-0.1.2}/MANIFEST.in +0 -0
  13. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/__init__.py +0 -0
  14. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/client.py +0 -0
  15. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/constants/__init__.py +0 -0
  16. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/constants/dimensions.py +0 -0
  17. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/errors.py +0 -0
  18. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/__init__.py +0 -0
  19. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/account.py +0 -0
  20. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/bridges.py +0 -0
  21. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/dat.py +0 -0
  22. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/ecosystem.py +0 -0
  23. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/emissions.py +0 -0
  24. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/etfs.py +0 -0
  25. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/prices.py +0 -0
  26. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/stablecoins.py +0 -0
  27. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/tvl.py +0 -0
  28. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/modules/yields.py +0 -0
  29. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/py.typed +0 -0
  30. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/__init__.py +0 -0
  31. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/account.py +0 -0
  32. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/bridges.py +0 -0
  33. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/dat.py +0 -0
  34. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/ecosystem.py +0 -0
  35. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/emissions.py +0 -0
  36. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/etfs.py +0 -0
  37. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/fees.py +0 -0
  38. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/prices.py +0 -0
  39. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/stablecoins.py +0 -0
  40. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/tvl.py +0 -0
  41. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/volumes.py +0 -0
  42. {defillama_sdk-0.1.0/defillama_api → defillama_sdk-0.1.2/defillama_sdk}/types/yields.py +0 -0
  43. {defillama_sdk-0.1.0 → defillama_sdk-0.1.2}/defillama_sdk.egg-info/dependency_links.txt +0 -0
  44. {defillama_sdk-0.1.0 → defillama_sdk-0.1.2}/defillama_sdk.egg-info/requires.txt +0 -0
  45. {defillama_sdk-0.1.0 → defillama_sdk-0.1.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: defillama-sdk
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for DefiLlama API
5
5
  Author: DefiLlama
6
6
  Project-URL: Homepage, https://api-docs.defillama.com/
@@ -27,7 +27,7 @@ uv pip install defillama-sdk
27
27
  ## Quick Start
28
28
 
29
29
  ```python
30
- from defillama_api import DefiLlama
30
+ from defillama_sdk import DefiLlama
31
31
 
32
32
  # Free tier
33
33
  client = DefiLlama()
@@ -386,7 +386,7 @@ Protocol fees and revenue data.
386
386
  ### Fee Data Types
387
387
 
388
388
  ```python
389
- from defillama_api import FeeDataType
389
+ from defillama_sdk import FeeDataType
390
390
 
391
391
  FeeDataType.DAILY_FEES
392
392
  FeeDataType.DAILY_REVENUE
@@ -641,7 +641,7 @@ usage = pro_client.account.getUsage()
641
641
  ## Error Handling
642
642
 
643
643
  ```python
644
- from defillama_api import ApiKeyRequiredError, RateLimitError, NotFoundError, ApiError
644
+ from defillama_sdk import ApiKeyRequiredError, RateLimitError, NotFoundError, ApiError
645
645
 
646
646
  try:
647
647
  data = pro_client.yields.getPools()
@@ -659,10 +659,10 @@ except ApiError as exc:
659
659
 
660
660
  ## Type Exports
661
661
 
662
- All types are available from `defillama_api.types`, and are re-exported at the top level:
662
+ All types are available from `defillama_sdk.types`, and are re-exported at the top level:
663
663
 
664
664
  ```python
665
- from defillama_api import Protocol, CoinPricesResponse, Stablecoin, YieldPool
665
+ from defillama_sdk import Protocol, CoinPricesResponse, Stablecoin, YieldPool
666
666
  ```
667
667
 
668
668
  ---
@@ -670,7 +670,7 @@ from defillama_api import Protocol, CoinPricesResponse, Stablecoin, YieldPool
670
670
  ## Constants
671
671
 
672
672
  ```python
673
- from defillama_api import AdapterType, FeeDataType, VolumeDataType
673
+ from defillama_sdk import AdapterType, FeeDataType, VolumeDataType
674
674
 
675
675
  AdapterType.DEXS
676
676
  VolumeDataType.DAILY_VOLUME
@@ -15,7 +15,7 @@ uv pip install defillama-sdk
15
15
  ## Quick Start
16
16
 
17
17
  ```python
18
- from defillama_api import DefiLlama
18
+ from defillama_sdk import DefiLlama
19
19
 
20
20
  # Free tier
21
21
  client = DefiLlama()
@@ -374,7 +374,7 @@ Protocol fees and revenue data.
374
374
  ### Fee Data Types
375
375
 
376
376
  ```python
377
- from defillama_api import FeeDataType
377
+ from defillama_sdk import FeeDataType
378
378
 
379
379
  FeeDataType.DAILY_FEES
380
380
  FeeDataType.DAILY_REVENUE
@@ -629,7 +629,7 @@ usage = pro_client.account.getUsage()
629
629
  ## Error Handling
630
630
 
631
631
  ```python
632
- from defillama_api import ApiKeyRequiredError, RateLimitError, NotFoundError, ApiError
632
+ from defillama_sdk import ApiKeyRequiredError, RateLimitError, NotFoundError, ApiError
633
633
 
634
634
  try:
635
635
  data = pro_client.yields.getPools()
@@ -647,10 +647,10 @@ except ApiError as exc:
647
647
 
648
648
  ## Type Exports
649
649
 
650
- All types are available from `defillama_api.types`, and are re-exported at the top level:
650
+ All types are available from `defillama_sdk.types`, and are re-exported at the top level:
651
651
 
652
652
  ```python
653
- from defillama_api import Protocol, CoinPricesResponse, Stablecoin, YieldPool
653
+ from defillama_sdk import Protocol, CoinPricesResponse, Stablecoin, YieldPool
654
654
  ```
655
655
 
656
656
  ---
@@ -658,7 +658,7 @@ from defillama_api import Protocol, CoinPricesResponse, Stablecoin, YieldPool
658
658
  ## Constants
659
659
 
660
660
  ```python
661
- from defillama_api import AdapterType, FeeDataType, VolumeDataType
661
+ from defillama_sdk import AdapterType, FeeDataType, VolumeDataType
662
662
 
663
663
  AdapterType.DEXS
664
664
  VolumeDataType.DAILY_VOLUME
@@ -38,13 +38,12 @@ class FeesModule:
38
38
  if options:
39
39
  if options.get("excludeTotalDataChart") is not None:
40
40
  params["excludeTotalDataChart"] = options.get("excludeTotalDataChart")
41
- if options.get("excludeTotalDataChartBreakdown") is not None:
42
- params["excludeTotalDataChartBreakdown"] = options.get(
43
- "excludeTotalDataChartBreakdown"
44
- )
45
41
  data_type = _data_type_value(options.get("dataType"))
46
42
  if data_type:
47
43
  params["dataType"] = data_type
44
+ params["excludeTotalDataChartBreakdown"] = not (
45
+ options and options.get("excludeTotalDataChartBreakdown") is False
46
+ )
48
47
  return self._client.get(
49
48
  "/overview/fees",
50
49
  params=params or None,
@@ -59,13 +58,12 @@ class FeesModule:
59
58
  if options:
60
59
  if options.get("excludeTotalDataChart") is not None:
61
60
  params["excludeTotalDataChart"] = options.get("excludeTotalDataChart")
62
- if options.get("excludeTotalDataChartBreakdown") is not None:
63
- params["excludeTotalDataChartBreakdown"] = options.get(
64
- "excludeTotalDataChartBreakdown"
65
- )
66
61
  data_type = _data_type_value(options.get("dataType"))
67
62
  if data_type:
68
63
  params["dataType"] = data_type
64
+ params["excludeTotalDataChartBreakdown"] = not (
65
+ options and options.get("excludeTotalDataChartBreakdown") is False
66
+ )
69
67
  return self._client.get(
70
68
  f"/overview/fees/{quote(chain)}",
71
69
  params=params or None,
@@ -32,12 +32,11 @@ class VolumesModule:
32
32
  if options:
33
33
  if options.get("excludeTotalDataChart") is not None:
34
34
  params["excludeTotalDataChart"] = options.get("excludeTotalDataChart")
35
- if options.get("excludeTotalDataChartBreakdown") is not None:
36
- params["excludeTotalDataChartBreakdown"] = options.get(
37
- "excludeTotalDataChartBreakdown"
38
- )
39
35
  if options.get("dataType"):
40
36
  params["dataType"] = options.get("dataType")
37
+ params["excludeTotalDataChartBreakdown"] = not (
38
+ options and options.get("excludeTotalDataChartBreakdown") is False
39
+ )
41
40
  return self._client.get(
42
41
  "/overview/dexs",
43
42
  params=params or None,
@@ -52,10 +51,9 @@ class VolumesModule:
52
51
  if options:
53
52
  if options.get("excludeTotalDataChart") is not None:
54
53
  params["excludeTotalDataChart"] = options.get("excludeTotalDataChart")
55
- if options.get("excludeTotalDataChartBreakdown") is not None:
56
- params["excludeTotalDataChartBreakdown"] = options.get(
57
- "excludeTotalDataChartBreakdown"
58
- )
54
+ params["excludeTotalDataChartBreakdown"] = not (
55
+ options and options.get("excludeTotalDataChartBreakdown") is False
56
+ )
59
57
  return self._client.get(
60
58
  f"/overview/dexs/{quote(chain)}",
61
59
  params=params or None,
@@ -83,10 +81,9 @@ class VolumesModule:
83
81
  if options:
84
82
  if options.get("excludeTotalDataChart") is not None:
85
83
  params["excludeTotalDataChart"] = options.get("excludeTotalDataChart")
86
- if options.get("excludeTotalDataChartBreakdown") is not None:
87
- params["excludeTotalDataChartBreakdown"] = options.get(
88
- "excludeTotalDataChartBreakdown"
89
- )
84
+ params["excludeTotalDataChartBreakdown"] = not (
85
+ options and options.get("excludeTotalDataChartBreakdown") is False
86
+ )
90
87
  return self._client.get(
91
88
  "/overview/options",
92
89
  params=params or None,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: defillama-sdk
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for DefiLlama API
5
5
  Author: DefiLlama
6
6
  Project-URL: Homepage, https://api-docs.defillama.com/
@@ -27,7 +27,7 @@ uv pip install defillama-sdk
27
27
  ## Quick Start
28
28
 
29
29
  ```python
30
- from defillama_api import DefiLlama
30
+ from defillama_sdk import DefiLlama
31
31
 
32
32
  # Free tier
33
33
  client = DefiLlama()
@@ -386,7 +386,7 @@ Protocol fees and revenue data.
386
386
  ### Fee Data Types
387
387
 
388
388
  ```python
389
- from defillama_api import FeeDataType
389
+ from defillama_sdk import FeeDataType
390
390
 
391
391
  FeeDataType.DAILY_FEES
392
392
  FeeDataType.DAILY_REVENUE
@@ -641,7 +641,7 @@ usage = pro_client.account.getUsage()
641
641
  ## Error Handling
642
642
 
643
643
  ```python
644
- from defillama_api import ApiKeyRequiredError, RateLimitError, NotFoundError, ApiError
644
+ from defillama_sdk import ApiKeyRequiredError, RateLimitError, NotFoundError, ApiError
645
645
 
646
646
  try:
647
647
  data = pro_client.yields.getPools()
@@ -659,10 +659,10 @@ except ApiError as exc:
659
659
 
660
660
  ## Type Exports
661
661
 
662
- All types are available from `defillama_api.types`, and are re-exported at the top level:
662
+ All types are available from `defillama_sdk.types`, and are re-exported at the top level:
663
663
 
664
664
  ```python
665
- from defillama_api import Protocol, CoinPricesResponse, Stablecoin, YieldPool
665
+ from defillama_sdk import Protocol, CoinPricesResponse, Stablecoin, YieldPool
666
666
  ```
667
667
 
668
668
  ---
@@ -670,7 +670,7 @@ from defillama_api import Protocol, CoinPricesResponse, Stablecoin, YieldPool
670
670
  ## Constants
671
671
 
672
672
  ```python
673
- from defillama_api import AdapterType, FeeDataType, VolumeDataType
673
+ from defillama_sdk import AdapterType, FeeDataType, VolumeDataType
674
674
 
675
675
  AdapterType.DEXS
676
676
  VolumeDataType.DAILY_VOLUME
@@ -0,0 +1,41 @@
1
+ LICENSE
2
+ MANIFEST.in
3
+ README.md
4
+ pyproject.toml
5
+ defillama_sdk/__init__.py
6
+ defillama_sdk/client.py
7
+ defillama_sdk/errors.py
8
+ defillama_sdk/py.typed
9
+ defillama_sdk.egg-info/PKG-INFO
10
+ defillama_sdk.egg-info/SOURCES.txt
11
+ defillama_sdk.egg-info/dependency_links.txt
12
+ defillama_sdk.egg-info/requires.txt
13
+ defillama_sdk.egg-info/top_level.txt
14
+ defillama_sdk/constants/__init__.py
15
+ defillama_sdk/constants/dimensions.py
16
+ defillama_sdk/modules/__init__.py
17
+ defillama_sdk/modules/account.py
18
+ defillama_sdk/modules/bridges.py
19
+ defillama_sdk/modules/dat.py
20
+ defillama_sdk/modules/ecosystem.py
21
+ defillama_sdk/modules/emissions.py
22
+ defillama_sdk/modules/etfs.py
23
+ defillama_sdk/modules/fees.py
24
+ defillama_sdk/modules/prices.py
25
+ defillama_sdk/modules/stablecoins.py
26
+ defillama_sdk/modules/tvl.py
27
+ defillama_sdk/modules/volumes.py
28
+ defillama_sdk/modules/yields.py
29
+ defillama_sdk/types/__init__.py
30
+ defillama_sdk/types/account.py
31
+ defillama_sdk/types/bridges.py
32
+ defillama_sdk/types/dat.py
33
+ defillama_sdk/types/ecosystem.py
34
+ defillama_sdk/types/emissions.py
35
+ defillama_sdk/types/etfs.py
36
+ defillama_sdk/types/fees.py
37
+ defillama_sdk/types/prices.py
38
+ defillama_sdk/types/stablecoins.py
39
+ defillama_sdk/types/tvl.py
40
+ defillama_sdk/types/volumes.py
41
+ defillama_sdk/types/yields.py
@@ -0,0 +1 @@
1
+ defillama_sdk
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "defillama-sdk"
7
- version = "0.1.0"
7
+ version = "0.1.2"
8
8
  description = "Python SDK for DefiLlama API"
9
9
  authors = [{name = "DefiLlama"}]
10
10
  readme = "README.md"
@@ -19,11 +19,11 @@ Repository = "https://github.com/DefiLlama/python-sdk"
19
19
 
20
20
  [tool.setuptools]
21
21
  packages = [
22
- "defillama_api",
23
- "defillama_api.constants",
24
- "defillama_api.modules",
25
- "defillama_api.types",
22
+ "defillama_sdk",
23
+ "defillama_sdk.constants",
24
+ "defillama_sdk.modules",
25
+ "defillama_sdk.types",
26
26
  ]
27
27
 
28
28
  [tool.setuptools.package-data]
29
- defillama_api = ["py.typed"]
29
+ defillama_sdk = ["py.typed"]
@@ -1,41 +0,0 @@
1
- LICENSE
2
- MANIFEST.in
3
- README.md
4
- pyproject.toml
5
- defillama_api/__init__.py
6
- defillama_api/client.py
7
- defillama_api/errors.py
8
- defillama_api/py.typed
9
- defillama_api/constants/__init__.py
10
- defillama_api/constants/dimensions.py
11
- defillama_api/modules/__init__.py
12
- defillama_api/modules/account.py
13
- defillama_api/modules/bridges.py
14
- defillama_api/modules/dat.py
15
- defillama_api/modules/ecosystem.py
16
- defillama_api/modules/emissions.py
17
- defillama_api/modules/etfs.py
18
- defillama_api/modules/fees.py
19
- defillama_api/modules/prices.py
20
- defillama_api/modules/stablecoins.py
21
- defillama_api/modules/tvl.py
22
- defillama_api/modules/volumes.py
23
- defillama_api/modules/yields.py
24
- defillama_api/types/__init__.py
25
- defillama_api/types/account.py
26
- defillama_api/types/bridges.py
27
- defillama_api/types/dat.py
28
- defillama_api/types/ecosystem.py
29
- defillama_api/types/emissions.py
30
- defillama_api/types/etfs.py
31
- defillama_api/types/fees.py
32
- defillama_api/types/prices.py
33
- defillama_api/types/stablecoins.py
34
- defillama_api/types/tvl.py
35
- defillama_api/types/volumes.py
36
- defillama_api/types/yields.py
37
- defillama_sdk.egg-info/PKG-INFO
38
- defillama_sdk.egg-info/SOURCES.txt
39
- defillama_sdk.egg-info/dependency_links.txt
40
- defillama_sdk.egg-info/requires.txt
41
- defillama_sdk.egg-info/top_level.txt
@@ -1 +0,0 @@
1
- defillama_api
File without changes
File without changes
File without changes