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.
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: snoopsharp
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for SEC EDGAR company filings and XBRL facts
5
- Author: REDX Contributors
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 :: 3 - Alpha
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 stuff in a plain Python API, so you can go from “I want Apple’s last 10-Ks” to working code without wrestling the raw endpoints.
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
- ## What it’s good for
33
+ ## Features
29
34
 
30
- - **Looking up companies** by ticker or CIK.
31
- - **Pulling recent filings** (10-K, 10-Q, 8-K, etc.) from the SEC submissions endpoint.
32
- - **Grabbing XBRL facts** (like revenue) without manually walking a giant JSON tree.
33
- - **Playing nice with SEC rules** — it asks for a real `User-Agent` and throttles requests by default.
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 (local/dev)
40
+ ## Install
36
41
 
37
42
  ```bash
38
- pip install -e .
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, either is fine
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
- ## If you want the raw SEC JSON
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
- ## A few honest notes
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’t parse full XBRL documents or every corner of EDGAR.
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
- 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.
4
-
5
- SnoopSharp wraps the common EDGAR stuff in a plain Python API, so you can go from “I want Apple’s last 10-Ks” to working code without wrestling the raw endpoints.
6
-
7
- ## What it’s good for
8
-
9
- - **Looking up companies** by ticker or CIK.
10
- - **Pulling recent filings** (10-K, 10-Q, 8-K, etc.) from the SEC submissions endpoint.
11
- - **Grabbing XBRL facts** (like revenue) without manually walking a giant JSON tree.
12
- - **Playing nice with SEC rules** — it asks for a real `User-Agent` and throttles requests by default.
13
-
14
- ## Install (local/dev)
15
-
16
- ```bash
17
- pip install -e .
18
- ```
19
-
20
- ## Quick start
21
-
22
- ```python
23
- from snoopsharp import EdgarClient
24
-
25
- # The SEC asks for a descriptive User-Agent with contact info.
26
- client = EdgarClient(user_agent="MyApp/1.0 (contact@example.com)")
27
-
28
- company = client.company("AAPL")
29
- print(company.name) # Apple Inc.
30
- print(company.cik) # 0000320193
31
-
32
- # Grab the latest 10-K filings
33
- for filing in company.filings(form="10-K", limit=5):
34
- print(filing.filed_at, filing.form, filing.accession_number)
35
- print(filing.primary_document_url)
36
-
37
- # Pull a specific XBRL fact
38
- facts = company.facts("us-gaap", "Revenues")
39
- latest = facts.latest(form="10-K", period="FY")
40
-
41
- if latest:
42
- print(latest.value, latest.unit, latest.end, latest.filed)
43
- ```
44
-
45
- ## Ticker or CIK, either is fine
46
-
47
- ```python
48
- client.get_company("MSFT")
49
- client.get_company(320193)
50
- client.get_company("CIK0000320193")
51
- ```
52
-
53
- ## If you want the raw SEC JSON
54
-
55
- Sometimes you just want the source payload:
56
-
57
- ```python
58
- submissions = client.get_submissions("AAPL")
59
- facts_json = client.get_company_facts("AAPL")
60
- ```
61
-
62
- ## A few honest notes
63
-
64
- - **Use a real User-Agent.** The SEC may block generic or anonymous clients. Something like `AppName/Version (you@example.com)` is the right move.
65
- - **Be polite.** The client throttles requests by default (about 10 requests/second). Leave that on.
66
- - **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.
67
- - This is an MVP. It covers the `submissions` and `companyfacts` endpoints. It doesn’t parse full XBRL documents or every corner of EDGAR.
68
-
69
- ## Development
70
-
71
- ```bash
72
- pip install -e .[dev]
73
- pytest
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.0"
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 = "REDX Contributors" }]
13
- dependencies = []
14
- keywords = ["sec", "edgar", "filings", "xbrl", "finance", "stocks"]
15
- classifiers = [
16
- "Development Status :: 3 - Alpha",
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.optional-dependencies]
26
- dev = ["pytest>=7.4"]
27
-
28
- [tool.setuptools]
29
- package-dir = {"" = "src"}
30
- include-package-data = true
31
-
32
- [tool.setuptools.packages.find]
33
- where = ["src"]
34
- include = ["snoopsharp*"]
35
-
36
- [tool.setuptools.package-data]
37
- snoopsharp = ["py.typed"]
38
-
39
- [tool.pytest.ini_options]
40
- testpaths = ["tests"]
41
- pythonpath = ["src"]
42
- addopts = "-ra"
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"
@@ -16,4 +16,4 @@ __all__ = [
16
16
  "BadResponse",
17
17
  ]
18
18
 
19
- __version__ = "0.1.0"
19
+ __version__ = "0.1.2"
@@ -1,11 +1,14 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: snoopsharp
3
- Version: 0.1.0
3
+ Version: 0.1.2
4
4
  Summary: Python SDK for SEC EDGAR company filings and XBRL facts
5
- Author: REDX Contributors
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 :: 3 - Alpha
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 stuff in a plain Python API, so you can go from “I want Apple’s last 10-Ks” to working code without wrestling the raw endpoints.
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
- ## What it’s good for
33
+ ## Features
29
34
 
30
- - **Looking up companies** by ticker or CIK.
31
- - **Pulling recent filings** (10-K, 10-Q, 8-K, etc.) from the SEC submissions endpoint.
32
- - **Grabbing XBRL facts** (like revenue) without manually walking a giant JSON tree.
33
- - **Playing nice with SEC rules** — it asks for a real `User-Agent` and throttles requests by default.
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 (local/dev)
40
+ ## Install
36
41
 
37
42
  ```bash
38
- pip install -e .
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, either is fine
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
- ## If you want the raw SEC JSON
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
- ## A few honest notes
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’t parse full XBRL documents or every corner of EDGAR.
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,10 +1,9 @@
1
- import json
2
1
  from datetime import date
3
2
 
4
3
  import pytest
5
4
  import urllib.error
6
5
 
7
- from snoopsharp import BadResponse, EdgarClient, InvalidUserAgent, NotFound
6
+ from snoopsharp import EdgarClient, InvalidUserAgent, NotFound
8
7
 
9
8
 
10
9
  def make_client():
File without changes
File without changes