snoopsharp 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.
- {snoopsharp-0.1.0/src/snoopsharp.egg-info → snoopsharp-0.1.2}/PKG-INFO +32 -15
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/README.md +88 -74
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/pyproject.toml +47 -42
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp/__init__.py +1 -1
- {snoopsharp-0.1.0 → snoopsharp-0.1.2/src/snoopsharp.egg-info}/PKG-INFO +32 -15
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/tests/test_snoopsharp.py +1 -2
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/LICENSE +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/setup.cfg +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp/client.py +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp/errors.py +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp/models.py +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp/py.typed +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp.egg-info/SOURCES.txt +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp.egg-info/dependency_links.txt +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp.egg-info/requires.txt +0 -0
- {snoopsharp-0.1.0 → snoopsharp-0.1.2}/src/snoopsharp.egg-info/top_level.txt +0 -0
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: snoopsharp
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Python SDK for SEC EDGAR company filings and XBRL facts
|
|
5
|
-
Author:
|
|
5
|
+
Author: GT47THY
|
|
6
6
|
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://pypi.org/project/snoopsharp/
|
|
8
|
+
Project-URL: Repository, https://pypi.org/project/snoopsharp/
|
|
9
|
+
Project-URL: Issues, https://pypi.org/project/snoopsharp/
|
|
7
10
|
Keywords: sec,edgar,filings,xbrl,finance,stocks
|
|
8
|
-
Classifier: Development Status ::
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
12
|
Classifier: Intended Audience :: Developers
|
|
10
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
14
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -21,21 +24,29 @@ Dynamic: license-file
|
|
|
21
24
|
|
|
22
25
|
# SnoopSharp
|
|
23
26
|
|
|
27
|
+
A small Python SDK for getting SEC EDGAR data without the usual pain.
|
|
28
|
+
|
|
24
29
|
SEC EDGAR has a ton of useful public data, but getting it out is fiddlier than it should be. The endpoints are spread out, the JSON is bulky, XBRL facts take some digging, and the SEC expects you to identify yourself and not hammer their servers.
|
|
25
30
|
|
|
26
|
-
SnoopSharp wraps the common EDGAR
|
|
31
|
+
SnoopSharp wraps the common EDGAR workflows in a plain Python API, so you can go from "I want Apple's last 10-Ks" to working code without wrestling raw endpoints.
|
|
27
32
|
|
|
28
|
-
##
|
|
33
|
+
## Features
|
|
29
34
|
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
33
|
-
- **
|
|
35
|
+
- **Company lookup** - by ticker or CIK.
|
|
36
|
+
- **Recent filings** - 10-K, 10-Q, 8-K, etc. from the SEC submissions endpoint.
|
|
37
|
+
- **XBRL facts** - pull numbers like revenue without manually walking a giant JSON tree.
|
|
38
|
+
- **Polite by default** - requires a real `User-Agent` and throttles requests.
|
|
34
39
|
|
|
35
|
-
## Install
|
|
40
|
+
## Install
|
|
36
41
|
|
|
37
42
|
```bash
|
|
38
|
-
pip install
|
|
43
|
+
pip install snoopsharp
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For local development:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install -e .[dev]
|
|
39
50
|
```
|
|
40
51
|
|
|
41
52
|
## Quick start
|
|
@@ -63,7 +74,9 @@ if latest:
|
|
|
63
74
|
print(latest.value, latest.unit, latest.end, latest.filed)
|
|
64
75
|
```
|
|
65
76
|
|
|
66
|
-
## Ticker or CIK
|
|
77
|
+
## Ticker or CIK
|
|
78
|
+
|
|
79
|
+
Either works:
|
|
67
80
|
|
|
68
81
|
```python
|
|
69
82
|
client.get_company("MSFT")
|
|
@@ -71,7 +84,7 @@ client.get_company(320193)
|
|
|
71
84
|
client.get_company("CIK0000320193")
|
|
72
85
|
```
|
|
73
86
|
|
|
74
|
-
##
|
|
87
|
+
## Raw SEC JSON
|
|
75
88
|
|
|
76
89
|
Sometimes you just want the source payload:
|
|
77
90
|
|
|
@@ -80,12 +93,12 @@ submissions = client.get_submissions("AAPL")
|
|
|
80
93
|
facts_json = client.get_company_facts("AAPL")
|
|
81
94
|
```
|
|
82
95
|
|
|
83
|
-
##
|
|
96
|
+
## Notes
|
|
84
97
|
|
|
85
98
|
- **Use a real User-Agent.** The SEC may block generic or anonymous clients. Something like `AppName/Version (you@example.com)` is the right move.
|
|
86
99
|
- **Be polite.** The client throttles requests by default (about 10 requests/second). Leave that on.
|
|
87
100
|
- **Public data still needs context.** EDGAR is the source, but companies report things differently. If a number really matters, trace it back to the actual filing.
|
|
88
|
-
- This is an MVP. It covers the `submissions` and `companyfacts` endpoints. It doesn
|
|
101
|
+
- This is an MVP. It covers the `submissions` and `companyfacts` endpoints. It doesn't parse full XBRL documents or every corner of EDGAR.
|
|
89
102
|
|
|
90
103
|
## Development
|
|
91
104
|
|
|
@@ -93,3 +106,7 @@ facts_json = client.get_company_facts("AAPL")
|
|
|
93
106
|
pip install -e .[dev]
|
|
94
107
|
pytest
|
|
95
108
|
```
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
MIT
|
|
@@ -1,74 +1,88 @@
|
|
|
1
|
-
# SnoopSharp
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
for
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
#
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
print(
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
```
|
|
52
|
-
|
|
53
|
-
##
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
```python
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
1
|
+
# SnoopSharp
|
|
2
|
+
|
|
3
|
+
A small Python SDK for getting SEC EDGAR data without the usual pain.
|
|
4
|
+
|
|
5
|
+
SEC EDGAR has a ton of useful public data, but getting it out is fiddlier than it should be. The endpoints are spread out, the JSON is bulky, XBRL facts take some digging, and the SEC expects you to identify yourself and not hammer their servers.
|
|
6
|
+
|
|
7
|
+
SnoopSharp wraps the common EDGAR workflows in a plain Python API, so you can go from "I want Apple's last 10-Ks" to working code without wrestling raw endpoints.
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- **Company lookup** - by ticker or CIK.
|
|
12
|
+
- **Recent filings** - 10-K, 10-Q, 8-K, etc. from the SEC submissions endpoint.
|
|
13
|
+
- **XBRL facts** - pull numbers like revenue without manually walking a giant JSON tree.
|
|
14
|
+
- **Polite by default** - requires a real `User-Agent` and throttles requests.
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install snoopsharp
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
For local development:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
pip install -e .[dev]
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Quick start
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from snoopsharp import EdgarClient
|
|
32
|
+
|
|
33
|
+
# The SEC asks for a descriptive User-Agent with contact info.
|
|
34
|
+
client = EdgarClient(user_agent="MyApp/1.0 (contact@example.com)")
|
|
35
|
+
|
|
36
|
+
company = client.company("AAPL")
|
|
37
|
+
print(company.name) # Apple Inc.
|
|
38
|
+
print(company.cik) # 0000320193
|
|
39
|
+
|
|
40
|
+
# Grab the latest 10-K filings
|
|
41
|
+
for filing in company.filings(form="10-K", limit=5):
|
|
42
|
+
print(filing.filed_at, filing.form, filing.accession_number)
|
|
43
|
+
print(filing.primary_document_url)
|
|
44
|
+
|
|
45
|
+
# Pull a specific XBRL fact
|
|
46
|
+
facts = company.facts("us-gaap", "Revenues")
|
|
47
|
+
latest = facts.latest(form="10-K", period="FY")
|
|
48
|
+
|
|
49
|
+
if latest:
|
|
50
|
+
print(latest.value, latest.unit, latest.end, latest.filed)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Ticker or CIK
|
|
54
|
+
|
|
55
|
+
Either works:
|
|
56
|
+
|
|
57
|
+
```python
|
|
58
|
+
client.get_company("MSFT")
|
|
59
|
+
client.get_company(320193)
|
|
60
|
+
client.get_company("CIK0000320193")
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
## Raw SEC JSON
|
|
64
|
+
|
|
65
|
+
Sometimes you just want the source payload:
|
|
66
|
+
|
|
67
|
+
```python
|
|
68
|
+
submissions = client.get_submissions("AAPL")
|
|
69
|
+
facts_json = client.get_company_facts("AAPL")
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Notes
|
|
73
|
+
|
|
74
|
+
- **Use a real User-Agent.** The SEC may block generic or anonymous clients. Something like `AppName/Version (you@example.com)` is the right move.
|
|
75
|
+
- **Be polite.** The client throttles requests by default (about 10 requests/second). Leave that on.
|
|
76
|
+
- **Public data still needs context.** EDGAR is the source, but companies report things differently. If a number really matters, trace it back to the actual filing.
|
|
77
|
+
- This is an MVP. It covers the `submissions` and `companyfacts` endpoints. It doesn't parse full XBRL documents or every corner of EDGAR.
|
|
78
|
+
|
|
79
|
+
## Development
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
pip install -e .[dev]
|
|
83
|
+
pytest
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## License
|
|
87
|
+
|
|
88
|
+
MIT
|
|
@@ -1,42 +1,47 @@
|
|
|
1
|
-
[build-system]
|
|
2
|
-
requires = ["setuptools>=61.0"]
|
|
3
|
-
build-backend = "setuptools.build_meta"
|
|
4
|
-
|
|
5
|
-
[project]
|
|
6
|
-
name = "snoopsharp"
|
|
7
|
-
version = "0.1.
|
|
8
|
-
description = "Python SDK for SEC EDGAR company filings and XBRL facts"
|
|
9
|
-
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.9"
|
|
11
|
-
license = { text = "MIT" }
|
|
12
|
-
authors = [{ name = "
|
|
13
|
-
dependencies = []
|
|
14
|
-
keywords = ["sec", "edgar", "filings", "xbrl", "finance", "stocks"]
|
|
15
|
-
classifiers = [
|
|
16
|
-
"Development Status ::
|
|
17
|
-
"Intended Audience :: Developers",
|
|
18
|
-
"License :: OSI Approved :: MIT License",
|
|
19
|
-
"Programming Language :: Python :: 3",
|
|
20
|
-
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
-
"Topic :: Office/Business :: Financial",
|
|
22
|
-
"Typing :: Typed",
|
|
23
|
-
]
|
|
24
|
-
|
|
25
|
-
[project.
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
[
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=61.0"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "snoopsharp"
|
|
7
|
+
version = "0.1.2"
|
|
8
|
+
description = "Python SDK for SEC EDGAR company filings and XBRL facts"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.9"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [{ name = "GT47THY" }]
|
|
13
|
+
dependencies = []
|
|
14
|
+
keywords = ["sec", "edgar", "filings", "xbrl", "finance", "stocks"]
|
|
15
|
+
classifiers = [
|
|
16
|
+
"Development Status :: 4 - Beta",
|
|
17
|
+
"Intended Audience :: Developers",
|
|
18
|
+
"License :: OSI Approved :: MIT License",
|
|
19
|
+
"Programming Language :: Python :: 3",
|
|
20
|
+
"Programming Language :: Python :: 3 :: Only",
|
|
21
|
+
"Topic :: Office/Business :: Financial",
|
|
22
|
+
"Typing :: Typed",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
[project.urls]
|
|
26
|
+
Homepage = "https://pypi.org/project/snoopsharp/"
|
|
27
|
+
Repository = "https://pypi.org/project/snoopsharp/"
|
|
28
|
+
Issues = "https://pypi.org/project/snoopsharp/"
|
|
29
|
+
|
|
30
|
+
[project.optional-dependencies]
|
|
31
|
+
dev = ["pytest>=7.4"]
|
|
32
|
+
|
|
33
|
+
[tool.setuptools]
|
|
34
|
+
package-dir = {"" = "src"}
|
|
35
|
+
include-package-data = true
|
|
36
|
+
|
|
37
|
+
[tool.setuptools.packages.find]
|
|
38
|
+
where = ["src"]
|
|
39
|
+
include = ["snoopsharp*"]
|
|
40
|
+
|
|
41
|
+
[tool.setuptools.package-data]
|
|
42
|
+
snoopsharp = ["py.typed"]
|
|
43
|
+
|
|
44
|
+
[tool.pytest.ini_options]
|
|
45
|
+
testpaths = ["tests"]
|
|
46
|
+
pythonpath = ["src"]
|
|
47
|
+
addopts = "-ra --strict-markers"
|
|
@@ -1,11 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: snoopsharp
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.2
|
|
4
4
|
Summary: Python SDK for SEC EDGAR company filings and XBRL facts
|
|
5
|
-
Author:
|
|
5
|
+
Author: GT47THY
|
|
6
6
|
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://pypi.org/project/snoopsharp/
|
|
8
|
+
Project-URL: Repository, https://pypi.org/project/snoopsharp/
|
|
9
|
+
Project-URL: Issues, https://pypi.org/project/snoopsharp/
|
|
7
10
|
Keywords: sec,edgar,filings,xbrl,finance,stocks
|
|
8
|
-
Classifier: Development Status ::
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
9
12
|
Classifier: Intended Audience :: Developers
|
|
10
13
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
14
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -21,21 +24,29 @@ Dynamic: license-file
|
|
|
21
24
|
|
|
22
25
|
# SnoopSharp
|
|
23
26
|
|
|
27
|
+
A small Python SDK for getting SEC EDGAR data without the usual pain.
|
|
28
|
+
|
|
24
29
|
SEC EDGAR has a ton of useful public data, but getting it out is fiddlier than it should be. The endpoints are spread out, the JSON is bulky, XBRL facts take some digging, and the SEC expects you to identify yourself and not hammer their servers.
|
|
25
30
|
|
|
26
|
-
SnoopSharp wraps the common EDGAR
|
|
31
|
+
SnoopSharp wraps the common EDGAR workflows in a plain Python API, so you can go from "I want Apple's last 10-Ks" to working code without wrestling raw endpoints.
|
|
27
32
|
|
|
28
|
-
##
|
|
33
|
+
## Features
|
|
29
34
|
|
|
30
|
-
- **
|
|
31
|
-
- **
|
|
32
|
-
- **
|
|
33
|
-
- **
|
|
35
|
+
- **Company lookup** - by ticker or CIK.
|
|
36
|
+
- **Recent filings** - 10-K, 10-Q, 8-K, etc. from the SEC submissions endpoint.
|
|
37
|
+
- **XBRL facts** - pull numbers like revenue without manually walking a giant JSON tree.
|
|
38
|
+
- **Polite by default** - requires a real `User-Agent` and throttles requests.
|
|
34
39
|
|
|
35
|
-
## Install
|
|
40
|
+
## Install
|
|
36
41
|
|
|
37
42
|
```bash
|
|
38
|
-
pip install
|
|
43
|
+
pip install snoopsharp
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
For local development:
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install -e .[dev]
|
|
39
50
|
```
|
|
40
51
|
|
|
41
52
|
## Quick start
|
|
@@ -63,7 +74,9 @@ if latest:
|
|
|
63
74
|
print(latest.value, latest.unit, latest.end, latest.filed)
|
|
64
75
|
```
|
|
65
76
|
|
|
66
|
-
## Ticker or CIK
|
|
77
|
+
## Ticker or CIK
|
|
78
|
+
|
|
79
|
+
Either works:
|
|
67
80
|
|
|
68
81
|
```python
|
|
69
82
|
client.get_company("MSFT")
|
|
@@ -71,7 +84,7 @@ client.get_company(320193)
|
|
|
71
84
|
client.get_company("CIK0000320193")
|
|
72
85
|
```
|
|
73
86
|
|
|
74
|
-
##
|
|
87
|
+
## Raw SEC JSON
|
|
75
88
|
|
|
76
89
|
Sometimes you just want the source payload:
|
|
77
90
|
|
|
@@ -80,12 +93,12 @@ submissions = client.get_submissions("AAPL")
|
|
|
80
93
|
facts_json = client.get_company_facts("AAPL")
|
|
81
94
|
```
|
|
82
95
|
|
|
83
|
-
##
|
|
96
|
+
## Notes
|
|
84
97
|
|
|
85
98
|
- **Use a real User-Agent.** The SEC may block generic or anonymous clients. Something like `AppName/Version (you@example.com)` is the right move.
|
|
86
99
|
- **Be polite.** The client throttles requests by default (about 10 requests/second). Leave that on.
|
|
87
100
|
- **Public data still needs context.** EDGAR is the source, but companies report things differently. If a number really matters, trace it back to the actual filing.
|
|
88
|
-
- This is an MVP. It covers the `submissions` and `companyfacts` endpoints. It doesn
|
|
101
|
+
- This is an MVP. It covers the `submissions` and `companyfacts` endpoints. It doesn't parse full XBRL documents or every corner of EDGAR.
|
|
89
102
|
|
|
90
103
|
## Development
|
|
91
104
|
|
|
@@ -93,3 +106,7 @@ facts_json = client.get_company_facts("AAPL")
|
|
|
93
106
|
pip install -e .[dev]
|
|
94
107
|
pytest
|
|
95
108
|
```
|
|
109
|
+
|
|
110
|
+
## License
|
|
111
|
+
|
|
112
|
+
MIT
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|