financegy 1.5__py3-none-any.whl → 2.0__py3-none-any.whl

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.
@@ -1,141 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: financegy
3
- Version: 1.5
4
- Summary: Unofficial Python library for accessing GSE (Guyana Stock Exchange) financial data
5
- Author-email: Ezra Minty <ezranminty@gmail.com>
6
- License: MIT
7
- Project-URL: Homepage, https://github.com/xbze3/financegy
8
- Project-URL: Issues, https://github.com/xbze3/financegy/issues
9
- Description-Content-Type: text/markdown
10
- License-File: LICENSE
11
- Requires-Dist: requests
12
- Requires-Dist: beautifulsoup4
13
- Requires-Dist: pandas
14
- Requires-Dist: openpyxl
15
- Dynamic: license-file
16
-
17
- # 🏦 FinanceGY
18
-
19
- **FinanceGY** is an unofficial Python library for accessing financial data from the **Guyana Stock Exchange (GSE)**. It provides a simple and consistent interface for retrieving information on traded securities, recent trade data, and session details, all programmatically.
20
-
21
- ---
22
-
23
- ## Installation
24
-
25
- ```bash
26
- pip install financegy
27
- ```
28
-
29
- ---
30
-
31
- ## Quick Start
32
-
33
- ```python
34
- import financegy
35
-
36
- # Get a list of all traded securities
37
- securities = financegy.get_securities()
38
-
39
- # Get the name of a security by its ticker symbol
40
- security_name = financegy.get_security_by_symbol("DDL")
41
-
42
- # Get the most recent trade data for a security
43
- recent_trade = financegy.get_recent_trade("DDL")
44
-
45
- # Get all trade data for the most recent year
46
- recent_year = financegy.get_security_recent_year("DDL")
47
-
48
- # Get trade data for a specific trading session
49
- session_trades = financegy.get_session_trades("1136")
50
-
51
- # Get session trade data for a specific security
52
- security_session_trade = financegy.get_security_session_trade("DDL", "1136")
53
-
54
- # Search for securities by name or symbol
55
- search_results = financegy.search_securities("DDL")
56
-
57
- # Get all trades for a given year
58
- year_trades = financegy.get_trades_for_year("DDL", "2019")
59
-
60
- # Get historical trades within a date range - (yyyy) / (mm/yyyy) / (dd/mm/yyyy)
61
- historical_trades = financegy.get_historical_trades(
62
- symbol="DDL",
63
- start_date="01/06/2020",
64
- end_date="01/2022"
65
- )
66
- ```
67
-
68
- ---
69
-
70
- ## Data Retrieval
71
-
72
- | Function | Description |
73
- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------- |
74
- | `get_securities()` | Returns a list of all currently traded securities on the GSE. |
75
- | `get_security_by_symbol(symbol: str)` | Retrieves the full name of a security using its ticker symbol (e.g., `"DDL"` → `"Demerara Distillers Limited"`). |
76
- | `get_recent_trade(symbol: str)` | Returns the most recent trade information for the given security. |
77
- | `get_security_recent_year(symbol: str)` | Fetches all trade data for the most recent year of the selected security. |
78
- | `get_session_trades(session: str)` | Retrieves trade data for all securities during a specific trading session. |
79
- | `get_security_session_trade(symbol: str, session: str)` | Retrieves trade data for a specific security in a given trading session. |
80
- | `search_securities(query: str)` | Searches for securities whose names or ticker symbols match the given query. |
81
- | `get_trades_for_year(symbol: str, year: str)` | Returns all trade records for a specific security during a given year. |
82
- | `get_historical_trades(symbol: str, start_date: str, end_date: str)` | Fetches historical trade data for a security within the specified date range (`dd/mm/yyyy`, `mm/yyyy`, `yyyy` format). |
83
-
84
- ---
85
-
86
- ### Data Utilities
87
-
88
- | Function | Description |
89
- | ---------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
90
- | `to_dataframe(data)` | Converts a list (or dictionary) of trade data into a Pandas DataFrame for easy analysis. Raises `TypeError` if the data is not properly formatted. |
91
- | `save_to_csv(data, filename: str = "output.csv", path: str = None)` | Saves the given data to a CSV file. By default, the file is saved to the current working directory. Returns `True` after saving successfully. |
92
- | `save_to_excel(data, filename: str = "output.xlsx", path: str = None)` | Saves the given data to an Excel `.xlsx` file. By default, the file is saved to the current working directory. Returns `True` after saving successfully. |
93
-
94
- ---
95
-
96
- ## Caching System
97
-
98
- FinanceGY includes a lightweight local caching system designed to speed up repeated requests and reduce unnecessary calls.
99
-
100
- Whenever you call a data retrieval function (such as `get_securities()` or `get_recent_trade()`), FinanceGY automatically checks whether a cached response already exists for that specific query:
101
-
102
- - If a valid cache file (less than 7 days old since sessions are held once per week) is found, the result is returned instantly from the cache.
103
- - If the cache is missing, disabled, or older than one week, FinanceGY fetches fresh data from the GSE and updates the cache automatically.
104
-
105
- All cache files are stored in a local `cache/` directory as small JSON files containing the retrieved data and a timestamp.
106
-
107
- You can manually clear all cached data at any time:
108
-
109
- ```python
110
- import financegy
111
-
112
- financegy.clear_cache()
113
- ```
114
-
115
- This will delete all cached files and force the next data request to fetch fresh data directly from the source.
116
-
117
- If you prefer to bypass the cache for a specific call, simply pass `use_cache=False` to any function. For example:
118
-
119
- ```python
120
- # Force a fresh fetch from the GSE, ignoring cached data
121
- recent_trade = financegy.get_recent_trade("DDL", use_cache=False)
122
- ```
123
-
124
- By default, caching is enabled for all supported functions unless explicitly turned off.
125
-
126
- ---
127
-
128
- ## License
129
-
130
- This project is licensed under the **MIT License**
131
-
132
- ---
133
-
134
- ## Example Use Case
135
-
136
- ```python
137
- import financegy
138
-
139
- ddl_recent = financegy.get_security_recent("DDL")
140
- print(ddl_recent)
141
- ```
@@ -1,12 +0,0 @@
1
- financegy/__init__.py,sha256=j938wP-4t3qnjgUOgLzr4lL9CevuNMGH10DWgDd-4Ew,929
2
- financegy/config.py,sha256=SD5LpUVZvthUJEN2KxInRzoOLZCgSMXHV-tc1kKSPt8,193
3
- financegy/cache/cache_manager.py,sha256=l2J7Fj3g0EnkJLGeIMuaslwFI9-6Ipmf4PHJLUMphAU,1859
4
- financegy/core/parser.py,sha256=Cuej95KUp_FJL58cskzdeaA2DNBDPR2v6JCo5jCZlKk,11071
5
- financegy/core/request_handler.py,sha256=g0C0R-nvIvicAhxnCEAtTU8buVtzUn8725EERvBA6ZU,276
6
- financegy/modules/securities.py,sha256=PNEqfot_cqneO0j4muRfYC5sbCUaZaJoKiq1exBXSz4,5233
7
- financegy/utils/utils.py,sha256=l0oOE36Br8A9uZp_1Cq82LZCKnZLEvLGCbExJzCkhA0,1328
8
- financegy-1.5.dist-info/licenses/LICENSE,sha256=HGLhx0fI215whUzIvTFdFivB447d_IdIIIRncUCQaEs,1088
9
- financegy-1.5.dist-info/METADATA,sha256=8XkenLyrcfzT04WHrM5YHudRRuFcdOGcPmR4eyMqtEw,6923
10
- financegy-1.5.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
11
- financegy-1.5.dist-info/top_level.txt,sha256=TpdYDxtK61m5xnvvzbqnDVJ82gphEqxnXN_Ur8rjvxQ,10
12
- financegy-1.5.dist-info/RECORD,,