finra-py 1.0.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 (39) hide show
  1. finra_py-1.0.0/LICENSE +9 -0
  2. finra_py-1.0.0/PKG-INFO +165 -0
  3. finra_py-1.0.0/README.rst +108 -0
  4. finra_py-1.0.0/finra/__init__.py +9 -0
  5. finra_py-1.0.0/finra/_enums.py +3111 -0
  6. finra_py-1.0.0/finra/_utils.py +100 -0
  7. finra_py-1.0.0/finra/async_client.py +113 -0
  8. finra_py-1.0.0/finra/auth.py +555 -0
  9. finra_py-1.0.0/finra/base_client.py +4927 -0
  10. finra_py-1.0.0/finra/client.py +112 -0
  11. finra_py-1.0.0/finra/debug.py +104 -0
  12. finra_py-1.0.0/finra/enum_converter.py +197 -0
  13. finra_py-1.0.0/finra/exceptions.py +56 -0
  14. finra_py-1.0.0/finra/filings/__init__.py +6 -0
  15. finra_py-1.0.0/finra/filings/base_filing.py +288 -0
  16. finra_py-1.0.0/finra/filings/create_individual.py +71 -0
  17. finra_py-1.0.0/finra/filings/form_br.py +125 -0
  18. finra_py-1.0.0/finra/filings/form_u4.py +309 -0
  19. finra_py-1.0.0/finra/filings/form_u5.py +163 -0
  20. finra_py-1.0.0/finra/filings/non_registered_fingerprint.py +147 -0
  21. finra_py-1.0.0/finra/filings/validator.py +110 -0
  22. finra_py-1.0.0/finra/filters.py +176 -0
  23. finra_py-1.0.0/finra/log_redactor.py +239 -0
  24. finra_py-1.0.0/finra/token_manager.py +89 -0
  25. finra_py-1.0.0/finra/utils.py +808 -0
  26. finra_py-1.0.0/finra_py.egg-info/PKG-INFO +165 -0
  27. finra_py-1.0.0/finra_py.egg-info/SOURCES.txt +37 -0
  28. finra_py-1.0.0/finra_py.egg-info/dependency_links.txt +1 -0
  29. finra_py-1.0.0/finra_py.egg-info/requires.txt +31 -0
  30. finra_py-1.0.0/finra_py.egg-info/top_level.txt +1 -0
  31. finra_py-1.0.0/pyproject.toml +96 -0
  32. finra_py-1.0.0/setup.cfg +4 -0
  33. finra_py-1.0.0/setup.py +14 -0
  34. finra_py-1.0.0/tests/test_auth.py +1214 -0
  35. finra_py-1.0.0/tests/test_client.py +5294 -0
  36. finra_py-1.0.0/tests/test_debug.py +341 -0
  37. finra_py-1.0.0/tests/test_enum_converter.py +21 -0
  38. finra_py-1.0.0/tests/test_filters.py +256 -0
  39. finra_py-1.0.0/tests/test_utils.py +952 -0
finra_py-1.0.0/LICENSE ADDED
@@ -0,0 +1,9 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright © 2026 Hawk Berry
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,165 @@
1
+ Metadata-Version: 2.4
2
+ Name: finra-py
3
+ Version: 1.0.0
4
+ Summary: An Unofficial, Open-Source Python Client Library for the FINRA API Platform
5
+ Author-email: Hawk Berry <finra@hawkberry.com>
6
+ License: The MIT License (MIT)
7
+
8
+ Copyright © 2026 Hawk Berry
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
15
+
16
+ Project-URL: Homepage, https://finra.hawkberry.com/en/latest/
17
+ Project-URL: Documentation, https://finra.hawkberry.com/en/latest/
18
+ Project-URL: Repository, https://github.com/hawkberry/finra-py
19
+ Project-URL: Changelog, https://github.com/hawkberry/finra-py/blob/main/CHANGELOG.md
20
+ Project-URL: Issues, https://github.com/hawkberry/finra-py/issues
21
+ Keywords: finra,finra-api,api-client,rest-api,market-data,compliance,regulatory,regtech,broker-dealer,trading,fixed-income,short-interest,trace
22
+ Classifier: Development Status :: 4 - Beta
23
+ Classifier: Intended Audience :: Financial and Insurance Industry
24
+ Classifier: Natural Language :: English
25
+ Classifier: Operating System :: OS Independent
26
+ Classifier: Programming Language :: Python :: 3
27
+ Classifier: Topic :: Office/Business :: Financial :: Investment
28
+ Classifier: Typing :: Typed
29
+ Requires-Python: >=3.11
30
+ Description-Content-Type: text/x-rst
31
+ License-File: LICENSE
32
+ Requires-Dist: authlib
33
+ Requires-Dist: httpx
34
+ Requires-Dist: jsonschema
35
+ Requires-Dist: tzdata
36
+ Provides-Extra: docs
37
+ Requires-Dist: sphinx==9.1.0; extra == "docs"
38
+ Requires-Dist: sphinx-autodoc-typehints==3.6.3; extra == "docs"
39
+ Requires-Dist: pydata-sphinx-theme==0.19.0; extra == "docs"
40
+ Provides-Extra: lint
41
+ Requires-Dist: ruff==0.15.2; extra == "lint"
42
+ Provides-Extra: stats
43
+ Requires-Dist: pycodestats; extra == "stats"
44
+ Provides-Extra: test
45
+ Requires-Dist: colorama==0.4.6; extra == "test"
46
+ Requires-Dist: coverage==7.14.2; extra == "test"
47
+ Provides-Extra: tox
48
+ Requires-Dist: tox==4.49.1; extra == "tox"
49
+ Provides-Extra: types
50
+ Requires-Dist: mypy==1.19.1; extra == "types"
51
+ Requires-Dist: types-Authlib==1.6.8.20260215; extra == "types"
52
+ Requires-Dist: types-colorama==0.4.15.20260508; extra == "types"
53
+ Requires-Dist: types-jsonschema==4.26.0.20260518; extra == "types"
54
+ Provides-Extra: dev
55
+ Requires-Dist: finra[docs,lint,stats,test,tox,types]; extra == "dev"
56
+ Dynamic: license-file
57
+
58
+ ============================================
59
+ ``finra-py``: An Unofficial FINRA API Client
60
+ ============================================
61
+
62
+ .. image:: https://github.com/hawkberry/finra-py/actions/workflows/run-tests.yml/badge.svg
63
+ :target: https://github.com/hawkberry/finra-py/actions/workflows/run-tests.yml
64
+
65
+ .. image:: https://codecov.io/github/hawkberry/finra-py/coverage.svg?branch=main
66
+ :target: https://codecov.io/github/hawkberry/finra-py?branch=main
67
+
68
+ .. image:: https://readthedocs.org/projects/finra-py/badge/?version=latest
69
+ :target: https://finra.hawkberry.com/en/latest/?badge=latest
70
+
71
+ .. image:: https://badge.fury.io/py/finra-py.svg
72
+ :target: https://badge.fury.io/py/finra-py
73
+
74
+ .. image:: https://img.shields.io/pypi/pyversions/finra-py.svg
75
+ :target: https://pypi.org/project/finra-py/
76
+
77
+ .. image:: https://img.shields.io/pypi/l/finra-py.svg
78
+ :target: https://github.com/hawkberry/finra-py/blob/main/LICENSE
79
+
80
+ .. image:: https://img.shields.io/badge/Support-blue
81
+ :target: https://support.hawkberry.com/
82
+
83
+ +++++++++++++++++++++
84
+ What is ``finra-py``?
85
+ +++++++++++++++++++++
86
+
87
+ ``finra-py`` is an unofficial, open-source Python client library for the `FINRA API Platform <https://developer.finra.org/products>`__. It is designed to be as thin and unopinionated as possible, offering an elegant programmatic interface to every endpoint and dataset.
88
+
89
+ Notable functionality includes:
90
+
91
+ - Authentication and client creation
92
+ - Equity, Fixed Income, FINRA, Firm, Registration and TRACE Report Card datasets via the `Query API <https://finra.hawkberry.com/en/latest/query-api.html>`__
93
+ - Notification datasets via the `Notification API <https://finra.hawkberry.com/en/latest/notification-api.html>`__
94
+ - Submission of regulatory filings and other data to FINRA via the `Submission API <https://finra.hawkberry.com/en/latest/submission-api.html>`__
95
+ - Support for the Mock API
96
+ - Support for the QA Test Environment API
97
+ - Support for all credential types
98
+ - Support for asynchronous requests (server-side)
99
+ - Support for ``asyncio`` (client-side)
100
+
101
+ Python requirement: **3.11 or later**
102
+
103
+ ++++++++++++++++++++++++++
104
+ How do I use ``finra-py``?
105
+ ++++++++++++++++++++++++++
106
+
107
+ You can find a full description of the ``finra-py`` library's functionality in the `documentation <https://finra.hawkberry.com/en/latest/>`__.
108
+
109
+ For detailed instructions on how to get started with ``finra-py``, see `Getting Started <https://finra.hawkberry.com/en/latest/getting-started.html>`__.
110
+
111
+ ++++++++++++++++++++++++++++++
112
+ Why should I use ``finra-py``?
113
+ ++++++++++++++++++++++++++++++
114
+
115
+ ``finra-py`` is designed to provide a few important pieces of functionality:
116
+
117
+ 1. **Safe Authentication**: The FINRA API Platform authentication and authorization scheme is based on OAuth 2.0. However, too many people online end up rolling their own implementation of the OAuth 2.0 authentication flow, which is both unnecessarily complex and dangerous. ``finra-py`` handles the token fetch and management for you.
118
+
119
+ 2. **Minimal API Wrapping**: Unlike some other API wrappers, which build in lots of opinionated logic and validation, ``finra-py`` takes raw values and returns raw responses, allowing you to interpret the complex API responses as you see fit. Anything you can do with raw HTTP requests you can do with ``finra-py``, only more easily.
120
+
121
+ 3. **All API Endpoints**: The ``finra-py`` library is designed to provide thorough coverage of the FINRA API Platform. With this goal in mind, ``finra-py`` implements full functionality for every dataset and regulatory filing supported by the FINRA API and described in the documentation.
122
+
123
+ +++++++++++
124
+ Limitations
125
+ +++++++++++
126
+
127
+ ``finra-py`` strives to provide comprehensive coverage of all documented datasets for the FINRA API. However, there are some datasets and services available through FINRA that may not be available through the FINRA API. See `FINRA Data <https://www.finra.org/finra-data>`__ for information about all available FINRA datasets.
128
+
129
+ - ``finra-py`` does not currently support FINRA's fileX API
130
+
131
+ ++++++++++++++++++++
132
+ Help and Development
133
+ ++++++++++++++++++++
134
+
135
+ For troubleshooting guidance and answers to common questions, see the
136
+ `Getting Help <https://finra.hawkberry.com/en/latest/help.html>`__ page.
137
+
138
+ Submit bug reports on the ``finra-py`` `Issues Page <https://github.com/hawkberry/finra-py/issues>`__ on GitHub.
139
+
140
+ If you need a dataset or feature that is not currently supported by the client, please file a `Feature Request <https://github.com/hawkberry/finra-py/issues>`__. Pull requests are not currently accepted.
141
+
142
+ ++++++++++++++++++++
143
+ FINRA API Consulting
144
+ ++++++++++++++++++++
145
+
146
+ Need help implementing the FINRA API?
147
+
148
+ As the author and maintainer of ``finra-py``, I provide consulting on FINRA API integrations, Web EFT migrations, compliance-related workflows, and market data systems.
149
+
150
+ See the `consulting page <https://finra.hawkberry.com/en/latest/consulting.html>`__ for more information.
151
+
152
+ +++++++++++++
153
+ Project Links
154
+ +++++++++++++
155
+
156
+ * `Documentation <https://finra.hawkberry.com/en/latest/>`__
157
+ * `Repository <https://github.com/hawkberry/finra-py>`__
158
+ * `PyPI <https://pypi.org/project/finra-py/>`__
159
+ * `Changelog <https://github.com/hawkberry/finra-py/blob/main/CHANGELOG.md>`__
160
+ * `Consulting <https://finra.hawkberry.com/en/latest/consulting.html>`__
161
+ * `Support <https://support.hawkberry.com/>`__
162
+ * `Issues <https://github.com/hawkberry/finra-py/issues>`__
163
+
164
+ **Disclaimer:** ``finra-py`` *is an unofficial, open-source client library for the FINRA API. It is not endorsed by, affiliated with, or sponsored by FINRA or any associated organization. Users are responsible for reviewing and complying with the terms of service and usage requirements of the underlying FINRA API. This software is provided under the terms of the* `LICENSE <https://github.com/hawkberry/finra-py/blob/main/LICENSE>`__ *without warranty of any kind.*
165
+
@@ -0,0 +1,108 @@
1
+ ============================================
2
+ ``finra-py``: An Unofficial FINRA API Client
3
+ ============================================
4
+
5
+ .. image:: https://github.com/hawkberry/finra-py/actions/workflows/run-tests.yml/badge.svg
6
+ :target: https://github.com/hawkberry/finra-py/actions/workflows/run-tests.yml
7
+
8
+ .. image:: https://codecov.io/github/hawkberry/finra-py/coverage.svg?branch=main
9
+ :target: https://codecov.io/github/hawkberry/finra-py?branch=main
10
+
11
+ .. image:: https://readthedocs.org/projects/finra-py/badge/?version=latest
12
+ :target: https://finra.hawkberry.com/en/latest/?badge=latest
13
+
14
+ .. image:: https://badge.fury.io/py/finra-py.svg
15
+ :target: https://badge.fury.io/py/finra-py
16
+
17
+ .. image:: https://img.shields.io/pypi/pyversions/finra-py.svg
18
+ :target: https://pypi.org/project/finra-py/
19
+
20
+ .. image:: https://img.shields.io/pypi/l/finra-py.svg
21
+ :target: https://github.com/hawkberry/finra-py/blob/main/LICENSE
22
+
23
+ .. image:: https://img.shields.io/badge/Support-blue
24
+ :target: https://support.hawkberry.com/
25
+
26
+ +++++++++++++++++++++
27
+ What is ``finra-py``?
28
+ +++++++++++++++++++++
29
+
30
+ ``finra-py`` is an unofficial, open-source Python client library for the `FINRA API Platform <https://developer.finra.org/products>`__. It is designed to be as thin and unopinionated as possible, offering an elegant programmatic interface to every endpoint and dataset.
31
+
32
+ Notable functionality includes:
33
+
34
+ - Authentication and client creation
35
+ - Equity, Fixed Income, FINRA, Firm, Registration and TRACE Report Card datasets via the `Query API <https://finra.hawkberry.com/en/latest/query-api.html>`__
36
+ - Notification datasets via the `Notification API <https://finra.hawkberry.com/en/latest/notification-api.html>`__
37
+ - Submission of regulatory filings and other data to FINRA via the `Submission API <https://finra.hawkberry.com/en/latest/submission-api.html>`__
38
+ - Support for the Mock API
39
+ - Support for the QA Test Environment API
40
+ - Support for all credential types
41
+ - Support for asynchronous requests (server-side)
42
+ - Support for ``asyncio`` (client-side)
43
+
44
+ Python requirement: **3.11 or later**
45
+
46
+ ++++++++++++++++++++++++++
47
+ How do I use ``finra-py``?
48
+ ++++++++++++++++++++++++++
49
+
50
+ You can find a full description of the ``finra-py`` library's functionality in the `documentation <https://finra.hawkberry.com/en/latest/>`__.
51
+
52
+ For detailed instructions on how to get started with ``finra-py``, see `Getting Started <https://finra.hawkberry.com/en/latest/getting-started.html>`__.
53
+
54
+ ++++++++++++++++++++++++++++++
55
+ Why should I use ``finra-py``?
56
+ ++++++++++++++++++++++++++++++
57
+
58
+ ``finra-py`` is designed to provide a few important pieces of functionality:
59
+
60
+ 1. **Safe Authentication**: The FINRA API Platform authentication and authorization scheme is based on OAuth 2.0. However, too many people online end up rolling their own implementation of the OAuth 2.0 authentication flow, which is both unnecessarily complex and dangerous. ``finra-py`` handles the token fetch and management for you.
61
+
62
+ 2. **Minimal API Wrapping**: Unlike some other API wrappers, which build in lots of opinionated logic and validation, ``finra-py`` takes raw values and returns raw responses, allowing you to interpret the complex API responses as you see fit. Anything you can do with raw HTTP requests you can do with ``finra-py``, only more easily.
63
+
64
+ 3. **All API Endpoints**: The ``finra-py`` library is designed to provide thorough coverage of the FINRA API Platform. With this goal in mind, ``finra-py`` implements full functionality for every dataset and regulatory filing supported by the FINRA API and described in the documentation.
65
+
66
+ +++++++++++
67
+ Limitations
68
+ +++++++++++
69
+
70
+ ``finra-py`` strives to provide comprehensive coverage of all documented datasets for the FINRA API. However, there are some datasets and services available through FINRA that may not be available through the FINRA API. See `FINRA Data <https://www.finra.org/finra-data>`__ for information about all available FINRA datasets.
71
+
72
+ - ``finra-py`` does not currently support FINRA's fileX API
73
+
74
+ ++++++++++++++++++++
75
+ Help and Development
76
+ ++++++++++++++++++++
77
+
78
+ For troubleshooting guidance and answers to common questions, see the
79
+ `Getting Help <https://finra.hawkberry.com/en/latest/help.html>`__ page.
80
+
81
+ Submit bug reports on the ``finra-py`` `Issues Page <https://github.com/hawkberry/finra-py/issues>`__ on GitHub.
82
+
83
+ If you need a dataset or feature that is not currently supported by the client, please file a `Feature Request <https://github.com/hawkberry/finra-py/issues>`__. Pull requests are not currently accepted.
84
+
85
+ ++++++++++++++++++++
86
+ FINRA API Consulting
87
+ ++++++++++++++++++++
88
+
89
+ Need help implementing the FINRA API?
90
+
91
+ As the author and maintainer of ``finra-py``, I provide consulting on FINRA API integrations, Web EFT migrations, compliance-related workflows, and market data systems.
92
+
93
+ See the `consulting page <https://finra.hawkberry.com/en/latest/consulting.html>`__ for more information.
94
+
95
+ +++++++++++++
96
+ Project Links
97
+ +++++++++++++
98
+
99
+ * `Documentation <https://finra.hawkberry.com/en/latest/>`__
100
+ * `Repository <https://github.com/hawkberry/finra-py>`__
101
+ * `PyPI <https://pypi.org/project/finra-py/>`__
102
+ * `Changelog <https://github.com/hawkberry/finra-py/blob/main/CHANGELOG.md>`__
103
+ * `Consulting <https://finra.hawkberry.com/en/latest/consulting.html>`__
104
+ * `Support <https://support.hawkberry.com/>`__
105
+ * `Issues <https://github.com/hawkberry/finra-py/issues>`__
106
+
107
+ **Disclaimer:** ``finra-py`` *is an unofficial, open-source client library for the FINRA API. It is not endorsed by, affiliated with, or sponsored by FINRA or any associated organization. Users are responsible for reviewing and complying with the terms of service and usage requirements of the underlying FINRA API. This software is provided under the terms of the* `LICENSE <https://github.com/hawkberry/finra-py/blob/main/LICENSE>`__ *without warranty of any kind.*
108
+
@@ -0,0 +1,9 @@
1
+ from . import async_client as async_client
2
+ from . import auth as auth
3
+ from . import client as client
4
+ from . import debug as debug
5
+ from . import exceptions as exceptions
6
+ from . import filings as filings
7
+ from . import filters as filters
8
+ from . import log_redactor as log_redactor
9
+ from . import utils as utils