currencycore 0.1.0__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 (83) hide show
  1. currencycore-0.1.0/LICENSE +21 -0
  2. currencycore-0.1.0/PKG-INFO +99 -0
  3. currencycore-0.1.0/README.md +72 -0
  4. currencycore-0.1.0/currencycore/__init__.py +108 -0
  5. currencycore-0.1.0/currencycore/api/__init__.py +5 -0
  6. currencycore-0.1.0/currencycore/api/currency_core_api.py +4632 -0
  7. currencycore-0.1.0/currencycore/api_client.py +804 -0
  8. currencycore-0.1.0/currencycore/api_response.py +21 -0
  9. currencycore-0.1.0/currencycore/client.py +26 -0
  10. currencycore-0.1.0/currencycore/configuration.py +614 -0
  11. currencycore-0.1.0/currencycore/exceptions.py +218 -0
  12. currencycore-0.1.0/currencycore/models/__init__.py +46 -0
  13. currencycore-0.1.0/currencycore/models/ai_response.py +94 -0
  14. currencycore-0.1.0/currencycore/models/api_error.py +105 -0
  15. currencycore-0.1.0/currencycore/models/api_error_error.py +97 -0
  16. currencycore-0.1.0/currencycore/models/convert_response.py +123 -0
  17. currencycore-0.1.0/currencycore/models/convert_response_results_inner.py +100 -0
  18. currencycore-0.1.0/currencycore/models/convert_response_results_inner_ppp.py +134 -0
  19. currencycore-0.1.0/currencycore/models/convert_response_results_inner_ppp_any_of.py +96 -0
  20. currencycore-0.1.0/currencycore/models/convert_response_results_inner_ppp_any_of1.py +88 -0
  21. currencycore-0.1.0/currencycore/models/correlation_response.py +115 -0
  22. currencycore-0.1.0/currencycore/models/correlation_response_results_inner.py +99 -0
  23. currencycore-0.1.0/currencycore/models/countries_response_inner.py +92 -0
  24. currencycore-0.1.0/currencycore/models/currencies_response_inner.py +94 -0
  25. currencycore-0.1.0/currencycore/models/drawdown_response.py +148 -0
  26. currencycore-0.1.0/currencycore/models/drawdown_response_results_inner.py +115 -0
  27. currencycore-0.1.0/currencycore/models/history_analysis_response.py +162 -0
  28. currencycore-0.1.0/currencycore/models/history_analysis_response_results_inner.py +137 -0
  29. currencycore-0.1.0/currencycore/models/history_analysis_response_results_inner_stats.py +92 -0
  30. currencycore-0.1.0/currencycore/models/history_response.py +105 -0
  31. currencycore-0.1.0/currencycore/models/mean_reversion_response.py +127 -0
  32. currencycore-0.1.0/currencycore/models/mean_reversion_response_results_inner.py +118 -0
  33. currencycore-0.1.0/currencycore/models/ppp_analysis_response.py +136 -0
  34. currencycore-0.1.0/currencycore/models/ppp_analysis_response_results_inner.py +125 -0
  35. currencycore-0.1.0/currencycore/models/rates_by_base_response.py +115 -0
  36. currencycore-0.1.0/currencycore/models/rates_by_base_response_ppp.py +92 -0
  37. currencycore-0.1.0/currencycore/models/rates_response.py +103 -0
  38. currencycore-0.1.0/currencycore/models/safe_haven_response.py +133 -0
  39. currencycore-0.1.0/currencycore/models/safe_haven_response_crisis.py +92 -0
  40. currencycore-0.1.0/currencycore/models/safe_haven_response_results_inner.py +118 -0
  41. currencycore-0.1.0/currencycore/models/volatility_response.py +157 -0
  42. currencycore-0.1.0/currencycore/models/volatility_response_results_inner.py +99 -0
  43. currencycore-0.1.0/currencycore/py.typed +0 -0
  44. currencycore-0.1.0/currencycore/rest.py +263 -0
  45. currencycore-0.1.0/currencycore.egg-info/PKG-INFO +99 -0
  46. currencycore-0.1.0/currencycore.egg-info/SOURCES.txt +82 -0
  47. currencycore-0.1.0/currencycore.egg-info/dependency_links.txt +1 -0
  48. currencycore-0.1.0/currencycore.egg-info/requires.txt +7 -0
  49. currencycore-0.1.0/currencycore.egg-info/top_level.txt +1 -0
  50. currencycore-0.1.0/pyproject.toml +36 -0
  51. currencycore-0.1.0/setup.cfg +7 -0
  52. currencycore-0.1.0/setup.py +47 -0
  53. currencycore-0.1.0/test/test_ai_response.py +61 -0
  54. currencycore-0.1.0/test/test_api_error.py +58 -0
  55. currencycore-0.1.0/test/test_api_error_error.py +55 -0
  56. currencycore-0.1.0/test/test_convert_response.py +78 -0
  57. currencycore-0.1.0/test/test_convert_response_results_inner.py +58 -0
  58. currencycore-0.1.0/test/test_convert_response_results_inner_ppp.py +62 -0
  59. currencycore-0.1.0/test/test_convert_response_results_inner_ppp_any_of.py +60 -0
  60. currencycore-0.1.0/test/test_convert_response_results_inner_ppp_any_of1.py +52 -0
  61. currencycore-0.1.0/test/test_correlation_response.py +70 -0
  62. currencycore-0.1.0/test/test_correlation_response_results_inner.py +57 -0
  63. currencycore-0.1.0/test/test_countries_response_inner.py +57 -0
  64. currencycore-0.1.0/test/test_currencies_response_inner.py +58 -0
  65. currencycore-0.1.0/test/test_currency_core_api.py +129 -0
  66. currencycore-0.1.0/test/test_drawdown_response.py +80 -0
  67. currencycore-0.1.0/test/test_drawdown_response_results_inner.py +59 -0
  68. currencycore-0.1.0/test/test_history_analysis_response.py +101 -0
  69. currencycore-0.1.0/test/test_history_analysis_response_results_inner.py +73 -0
  70. currencycore-0.1.0/test/test_history_analysis_response_results_inner_stats.py +56 -0
  71. currencycore-0.1.0/test/test_history_response.py +66 -0
  72. currencycore-0.1.0/test/test_mean_reversion_response.py +75 -0
  73. currencycore-0.1.0/test/test_mean_reversion_response_results_inner.py +61 -0
  74. currencycore-0.1.0/test/test_ppp_analysis_response.py +95 -0
  75. currencycore-0.1.0/test/test_ppp_analysis_response_results_inner.py +72 -0
  76. currencycore-0.1.0/test/test_rates_by_base_response.py +70 -0
  77. currencycore-0.1.0/test/test_rates_by_base_response_ppp.py +60 -0
  78. currencycore-0.1.0/test/test_rates_response.py +64 -0
  79. currencycore-0.1.0/test/test_safe_haven_response.py +83 -0
  80. currencycore-0.1.0/test/test_safe_haven_response_crisis.py +56 -0
  81. currencycore-0.1.0/test/test_safe_haven_response_results_inner.py +61 -0
  82. currencycore-0.1.0/test/test_volatility_response.py +76 -0
  83. currencycore-0.1.0/test/test_volatility_response_results_inner.py +57 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 CurrencyCore
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,99 @@
1
+ Metadata-Version: 2.4
2
+ Name: currencycore
3
+ Version: 0.1.0
4
+ Summary: Official CurrencyCore API client - currency conversion, FX rates, PPP, and analytics.
5
+ Home-page:
6
+ Author: OpenAPI Generator community
7
+ Author-email: CurrencyCore <dev@currency-core.com>
8
+ License-Expression: MIT
9
+ Project-URL: Homepage, https://currency-core.com
10
+ Project-URL: Repository, https://github.com/CurrencyCore/currencycore-python
11
+ Keywords: currencycore,currency,exchange-rates,forex,ppp,fx,api,sdk
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Operating System :: OS Independent
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
16
+ Requires-Python: >=3.9
17
+ Description-Content-Type: text/markdown
18
+ License-File: LICENSE
19
+ Requires-Dist: urllib3<3.0.0,>=2.1.0
20
+ Requires-Dist: python-dateutil>=2.8.2
21
+ Requires-Dist: pydantic>=2.11
22
+ Requires-Dist: typing-extensions>=4.7.1
23
+ Provides-Extra: dev
24
+ Requires-Dist: pytest>=7.2.1; extra == "dev"
25
+ Dynamic: author
26
+ Dynamic: license-file
27
+
28
+ # CurrencyCore SDK for Python
29
+
30
+ Official client for the [CurrencyCore](https://currency-core.com) API — currency
31
+ conversion, FX rates, PPP, and analytics.
32
+
33
+ Generated from the CurrencyCore OpenAPI 3.1 spec with
34
+ [OpenAPI Generator](https://openapi-generator.tech) (`python`, urllib3), plus a
35
+ thin `create_client` helper for API-key and version handling.
36
+
37
+ ## Install
38
+
39
+ ```bash
40
+ pip install currencycore
41
+ ```
42
+
43
+ ## Quickstart
44
+
45
+ ```python
46
+ from currencycore.client import create_client
47
+
48
+ api = create_client(api_key="cc_live_...") # or set CURRENCYCORE_API_KEY
49
+ res = api.convert(var_from="USD", to="EUR", amount=100)
50
+ print(res.results[0])
51
+ ```
52
+
53
+ `var_from` carries the `var_` prefix because `from` is a reserved word in Python.
54
+
55
+ Public reference endpoints need no key:
56
+
57
+ ```python
58
+ api = create_client()
59
+ print(api.currencies())
60
+ ```
61
+
62
+ ## API key
63
+
64
+ `create_client` resolves the key as `api_key` → `CURRENCYCORE_API_KEY`.
65
+
66
+ ## API version
67
+
68
+ Base URL is `https://api.currency-core.com/{version}` (default `v1`):
69
+
70
+ ```python
71
+ create_client(version="v1")
72
+ create_client(base_url="https://api.currency-core.com/v1")
73
+ ```
74
+
75
+ ## Low-level client
76
+
77
+ ```python
78
+ import currencycore
79
+
80
+ config = currencycore.Configuration(
81
+ host="https://api.currency-core.com/v1", access_token="cc_live_..."
82
+ )
83
+ api = currencycore.CurrencyCoreApi(currencycore.ApiClient(config))
84
+ ```
85
+
86
+ ## Regenerate
87
+
88
+ The committed `openapi.json` is the source of truth:
89
+
90
+ ```bash
91
+ bash scripts/generate.sh
92
+ ```
93
+
94
+ Hand-written files (`currencycore/client.py`, this README) are protected by
95
+ `.openapi-generator-ignore`.
96
+
97
+ ## License
98
+
99
+ MIT
@@ -0,0 +1,72 @@
1
+ # CurrencyCore SDK for Python
2
+
3
+ Official client for the [CurrencyCore](https://currency-core.com) API — currency
4
+ conversion, FX rates, PPP, and analytics.
5
+
6
+ Generated from the CurrencyCore OpenAPI 3.1 spec with
7
+ [OpenAPI Generator](https://openapi-generator.tech) (`python`, urllib3), plus a
8
+ thin `create_client` helper for API-key and version handling.
9
+
10
+ ## Install
11
+
12
+ ```bash
13
+ pip install currencycore
14
+ ```
15
+
16
+ ## Quickstart
17
+
18
+ ```python
19
+ from currencycore.client import create_client
20
+
21
+ api = create_client(api_key="cc_live_...") # or set CURRENCYCORE_API_KEY
22
+ res = api.convert(var_from="USD", to="EUR", amount=100)
23
+ print(res.results[0])
24
+ ```
25
+
26
+ `var_from` carries the `var_` prefix because `from` is a reserved word in Python.
27
+
28
+ Public reference endpoints need no key:
29
+
30
+ ```python
31
+ api = create_client()
32
+ print(api.currencies())
33
+ ```
34
+
35
+ ## API key
36
+
37
+ `create_client` resolves the key as `api_key` → `CURRENCYCORE_API_KEY`.
38
+
39
+ ## API version
40
+
41
+ Base URL is `https://api.currency-core.com/{version}` (default `v1`):
42
+
43
+ ```python
44
+ create_client(version="v1")
45
+ create_client(base_url="https://api.currency-core.com/v1")
46
+ ```
47
+
48
+ ## Low-level client
49
+
50
+ ```python
51
+ import currencycore
52
+
53
+ config = currencycore.Configuration(
54
+ host="https://api.currency-core.com/v1", access_token="cc_live_..."
55
+ )
56
+ api = currencycore.CurrencyCoreApi(currencycore.ApiClient(config))
57
+ ```
58
+
59
+ ## Regenerate
60
+
61
+ The committed `openapi.json` is the source of truth:
62
+
63
+ ```bash
64
+ bash scripts/generate.sh
65
+ ```
66
+
67
+ Hand-written files (`currencycore/client.py`, this README) are protected by
68
+ `.openapi-generator-ignore`.
69
+
70
+ ## License
71
+
72
+ MIT
@@ -0,0 +1,108 @@
1
+ # coding: utf-8
2
+
3
+ # flake8: noqa
4
+
5
+ """
6
+ CurrencyCore API
7
+
8
+ Edge-native currency exchange, PPP, and FX analytics API. Authenticate with your API key as `Authorization: Bearer <key>`.
9
+
10
+ The version of the OpenAPI document: v1
11
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
12
+
13
+ Do not edit the class manually.
14
+ """ # noqa: E501
15
+
16
+
17
+ __version__ = "0.1.0"
18
+
19
+ # Define package exports
20
+ __all__ = [
21
+ "CurrencyCoreApi",
22
+ "ApiResponse",
23
+ "ApiClient",
24
+ "Configuration",
25
+ "OpenApiException",
26
+ "ApiTypeError",
27
+ "ApiValueError",
28
+ "ApiKeyError",
29
+ "ApiAttributeError",
30
+ "ApiException",
31
+ "AiResponse",
32
+ "ApiError",
33
+ "ApiErrorError",
34
+ "ConvertResponse",
35
+ "ConvertResponseResultsInner",
36
+ "ConvertResponseResultsInnerPpp",
37
+ "ConvertResponseResultsInnerPppAnyOf",
38
+ "ConvertResponseResultsInnerPppAnyOf1",
39
+ "CorrelationResponse",
40
+ "CorrelationResponseResultsInner",
41
+ "CountriesResponseInner",
42
+ "CurrenciesResponseInner",
43
+ "DrawdownResponse",
44
+ "DrawdownResponseResultsInner",
45
+ "HistoryAnalysisResponse",
46
+ "HistoryAnalysisResponseResultsInner",
47
+ "HistoryAnalysisResponseResultsInnerStats",
48
+ "HistoryResponse",
49
+ "MeanReversionResponse",
50
+ "MeanReversionResponseResultsInner",
51
+ "PppAnalysisResponse",
52
+ "PppAnalysisResponseResultsInner",
53
+ "RatesByBaseResponse",
54
+ "RatesByBaseResponsePpp",
55
+ "RatesResponse",
56
+ "SafeHavenResponse",
57
+ "SafeHavenResponseCrisis",
58
+ "SafeHavenResponseResultsInner",
59
+ "VolatilityResponse",
60
+ "VolatilityResponseResultsInner",
61
+ ]
62
+
63
+ # import apis into sdk package
64
+ from currencycore.api.currency_core_api import CurrencyCoreApi as CurrencyCoreApi
65
+
66
+ # import ApiClient
67
+ from currencycore.api_response import ApiResponse as ApiResponse
68
+ from currencycore.api_client import ApiClient as ApiClient
69
+ from currencycore.configuration import Configuration as Configuration
70
+ from currencycore.exceptions import OpenApiException as OpenApiException
71
+ from currencycore.exceptions import ApiTypeError as ApiTypeError
72
+ from currencycore.exceptions import ApiValueError as ApiValueError
73
+ from currencycore.exceptions import ApiKeyError as ApiKeyError
74
+ from currencycore.exceptions import ApiAttributeError as ApiAttributeError
75
+ from currencycore.exceptions import ApiException as ApiException
76
+
77
+ # import models into sdk package
78
+ from currencycore.models.ai_response import AiResponse as AiResponse
79
+ from currencycore.models.api_error import ApiError as ApiError
80
+ from currencycore.models.api_error_error import ApiErrorError as ApiErrorError
81
+ from currencycore.models.convert_response import ConvertResponse as ConvertResponse
82
+ from currencycore.models.convert_response_results_inner import ConvertResponseResultsInner as ConvertResponseResultsInner
83
+ from currencycore.models.convert_response_results_inner_ppp import ConvertResponseResultsInnerPpp as ConvertResponseResultsInnerPpp
84
+ from currencycore.models.convert_response_results_inner_ppp_any_of import ConvertResponseResultsInnerPppAnyOf as ConvertResponseResultsInnerPppAnyOf
85
+ from currencycore.models.convert_response_results_inner_ppp_any_of1 import ConvertResponseResultsInnerPppAnyOf1 as ConvertResponseResultsInnerPppAnyOf1
86
+ from currencycore.models.correlation_response import CorrelationResponse as CorrelationResponse
87
+ from currencycore.models.correlation_response_results_inner import CorrelationResponseResultsInner as CorrelationResponseResultsInner
88
+ from currencycore.models.countries_response_inner import CountriesResponseInner as CountriesResponseInner
89
+ from currencycore.models.currencies_response_inner import CurrenciesResponseInner as CurrenciesResponseInner
90
+ from currencycore.models.drawdown_response import DrawdownResponse as DrawdownResponse
91
+ from currencycore.models.drawdown_response_results_inner import DrawdownResponseResultsInner as DrawdownResponseResultsInner
92
+ from currencycore.models.history_analysis_response import HistoryAnalysisResponse as HistoryAnalysisResponse
93
+ from currencycore.models.history_analysis_response_results_inner import HistoryAnalysisResponseResultsInner as HistoryAnalysisResponseResultsInner
94
+ from currencycore.models.history_analysis_response_results_inner_stats import HistoryAnalysisResponseResultsInnerStats as HistoryAnalysisResponseResultsInnerStats
95
+ from currencycore.models.history_response import HistoryResponse as HistoryResponse
96
+ from currencycore.models.mean_reversion_response import MeanReversionResponse as MeanReversionResponse
97
+ from currencycore.models.mean_reversion_response_results_inner import MeanReversionResponseResultsInner as MeanReversionResponseResultsInner
98
+ from currencycore.models.ppp_analysis_response import PppAnalysisResponse as PppAnalysisResponse
99
+ from currencycore.models.ppp_analysis_response_results_inner import PppAnalysisResponseResultsInner as PppAnalysisResponseResultsInner
100
+ from currencycore.models.rates_by_base_response import RatesByBaseResponse as RatesByBaseResponse
101
+ from currencycore.models.rates_by_base_response_ppp import RatesByBaseResponsePpp as RatesByBaseResponsePpp
102
+ from currencycore.models.rates_response import RatesResponse as RatesResponse
103
+ from currencycore.models.safe_haven_response import SafeHavenResponse as SafeHavenResponse
104
+ from currencycore.models.safe_haven_response_crisis import SafeHavenResponseCrisis as SafeHavenResponseCrisis
105
+ from currencycore.models.safe_haven_response_results_inner import SafeHavenResponseResultsInner as SafeHavenResponseResultsInner
106
+ from currencycore.models.volatility_response import VolatilityResponse as VolatilityResponse
107
+ from currencycore.models.volatility_response_results_inner import VolatilityResponseResultsInner as VolatilityResponseResultsInner
108
+
@@ -0,0 +1,5 @@
1
+ # flake8: noqa
2
+
3
+ # import apis into api package
4
+ from currencycore.api.currency_core_api import CurrencyCoreApi
5
+