Skip to content

Commit bfecbf9

Browse files
committed
Clean up and conver to namespace.
1 parent ce8407a commit bfecbf9

File tree

7 files changed

+137
-128
lines changed

7 files changed

+137
-128
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99

1010
## Overview
1111

12-
Current Version: **0.1.4**
12+
Current Version: **0.1.5**
1313

1414
The Securities & Exchange Commission (SEC) has a treasure trove of business data available to indviduals
1515
for free. However, the biggest obstacle to getting this free data boils down to two challenges:

edgar/client.py

Lines changed: 22 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
"""This module provides access to the different endpoint services of Edgar."""
2+
13
from edgar.session import EdgarSession
24
from edgar.archives import Archives
35
from edgar.companies import Companies
@@ -15,6 +17,13 @@
1517

1618
class EdgarClient():
1719

20+
"""
21+
## Overview:
22+
----
23+
Represents the main Edgar client which is used to
24+
instantiate the different endpoints.
25+
"""
26+
1827
def __init__(self) -> None:
1928
"""Initializes the `EdgarClient`.
2029
@@ -28,10 +37,7 @@ def __init__(self) -> None:
2837
def __repr__(self) -> str:
2938
"""String representation of the `EdgarClient` object."""
3039

31-
# define the string representation
32-
str_representation = '<EdgarClient (active=True, connected=True)>'
33-
34-
return str_representation
40+
return '<EdgarClient (active=True, connected=True)>'
3541

3642
def archives(self) -> Archives:
3743
"""Used to access the `Archives` services.
@@ -42,10 +48,7 @@ def archives(self) -> Archives:
4248
The `Archives` services Object.
4349
"""
4450

45-
# Grab the `Archives` object.
46-
object = Archives(session=self.edgar_session)
47-
48-
return object
51+
return Archives(session=self.edgar_session)
4952

5053
def companies(self) -> Companies:
5154
"""Used to access the `Companies` services.
@@ -56,10 +59,7 @@ def companies(self) -> Companies:
5659
The `Companies` services Object.
5760
"""
5861

59-
# Grab the `Archives` object.
60-
object = Companies(session=self.edgar_session)
61-
62-
return object
62+
return Companies(session=self.edgar_session)
6363

6464
def series(self) -> Series:
6565
"""Used to access the `Series` services.
@@ -70,10 +70,7 @@ def series(self) -> Series:
7070
The `Series` services Object.
7171
"""
7272

73-
# Grab the `Series` object.
74-
object = Series(session=self.edgar_session)
75-
76-
return object
73+
return Series(session=self.edgar_session)
7774

7875
def mutual_funds(self) -> MutualFunds:
7976
"""Used to access the `MutualFunds` services.
@@ -84,10 +81,7 @@ def mutual_funds(self) -> MutualFunds:
8481
The `MutualFunds` services Object.
8582
"""
8683

87-
# Grab the `MutualFunds` object.
88-
object = MutualFunds(session=self.edgar_session)
89-
90-
return object
84+
return MutualFunds(session=self.edgar_session)
9185

9286
def variable_insurance_products(self) -> VariableInsuranceProducts:
9387
"""Used to access the `VariableInsuranceProducts` services.
@@ -98,10 +92,7 @@ def variable_insurance_products(self) -> VariableInsuranceProducts:
9892
The `VariableInsuranceProducts` services Object.
9993
"""
10094

101-
# Grab the `VariableInsuranceProducts` object.
102-
object = VariableInsuranceProducts(session=self.edgar_session)
103-
104-
return object
95+
return VariableInsuranceProducts(session=self.edgar_session)
10596

10697
def datasets(self) -> Datasets:
10798
"""Used to access the `Datasets` services.
@@ -112,10 +103,7 @@ def datasets(self) -> Datasets:
112103
The `Datasets` services Object.
113104
"""
114105

115-
# Grab the `Datasets` object.
116-
object = Datasets(session=self.edgar_session)
117-
118-
return object
106+
return Datasets(session=self.edgar_session)
119107

120108
def filings(self) -> Filings:
121109
"""Used to access the `Filings` services.
@@ -126,10 +114,7 @@ def filings(self) -> Filings:
126114
The `Filings` services Object.
127115
"""
128116

129-
# Grab the `Filings` object.
130-
object = Filings(session=self.edgar_session)
131-
132-
return object
117+
return Filings(session=self.edgar_session)
133118

134119
def current_events(self) -> CurrentEvents:
135120
"""Used to access the `CurrentEvents` services.
@@ -140,10 +125,7 @@ def current_events(self) -> CurrentEvents:
140125
The `CurrentEvents` services Object.
141126
"""
142127

143-
# Grab the `CurrentEvents` object.
144-
object = CurrentEvents(session=self.edgar_session)
145-
146-
return object
128+
return CurrentEvents(session=self.edgar_session)
147129

148130
def issuers(self) -> Issuers:
149131
"""Used to access the `Issuers` services.
@@ -154,10 +136,7 @@ def issuers(self) -> Issuers:
154136
The `Issuers` services Object.
155137
"""
156138

157-
# Grab the `Issuers` object.
158-
object = Issuers(session=self.edgar_session)
159-
160-
return object
139+
return Issuers(session=self.edgar_session)
161140

162141
def ownership_filings(self) -> OwnershipFilings:
163142
"""Used to access the `OwnershipFilings` services.
@@ -168,10 +147,7 @@ def ownership_filings(self) -> OwnershipFilings:
168147
The `OwnershipFilings` services Object.
169148
"""
170149

171-
# Grab the `OwnershipFilings` object.
172-
object = OwnershipFilings(session=self.edgar_session)
173-
174-
return object
150+
return OwnershipFilings(session=self.edgar_session)
175151

176152
def submissions(self) -> Submissions:
177153
"""Used to access the `Submissions` services.
@@ -182,10 +158,7 @@ def submissions(self) -> Submissions:
182158
The `Submissions` services Object.
183159
"""
184160

185-
# Grab the `Submissions` object.
186-
object = Submissions(session=self.edgar_session)
187-
188-
return object
161+
return Submissions(session=self.edgar_session)
189162

190163
def xbrl(self) -> Xbrl:
191164
"""Used to access the `Xbrl` services.
@@ -196,7 +169,4 @@ def xbrl(self) -> Xbrl:
196169
The `Xbrl` services Object.
197170
"""
198171

199-
# Grab the `Xbrl` object.
200-
object = Xbrl(session=self.edgar_session)
201-
202-
return object
172+
return Xbrl(session=self.edgar_session)

0 commit comments

Comments
 (0)