earningscall 0.0.21__py3-none-any.whl → 0.0.22__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.
- earningscall/api.py +9 -1
- earningscall/company.py +3 -0
- earningscall/transcript.py +10 -1
- {earningscall-0.0.21.dist-info → earningscall-0.0.22.dist-info}/METADATA +38 -2
- {earningscall-0.0.21.dist-info → earningscall-0.0.22.dist-info}/RECORD +7 -7
- {earningscall-0.0.21.dist-info → earningscall-0.0.22.dist-info}/WHEEL +1 -1
- {earningscall-0.0.21.dist-info → earningscall-0.0.22.dist-info}/licenses/LICENSE +0 -0
earningscall/api.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import importlib
|
2
2
|
import logging
|
3
3
|
import os
|
4
|
+
from importlib.metadata import PackageNotFoundError
|
4
5
|
from typing import Optional
|
5
6
|
|
6
7
|
import requests
|
@@ -46,8 +47,15 @@ def purge_cache():
|
|
46
47
|
return cache_session().cache.clear()
|
47
48
|
|
48
49
|
|
50
|
+
def get_earnings_call_version():
|
51
|
+
try:
|
52
|
+
return importlib.metadata.version("earningscall")
|
53
|
+
except PackageNotFoundError:
|
54
|
+
return None
|
55
|
+
|
56
|
+
|
49
57
|
def get_headers():
|
50
|
-
earnings_call_version =
|
58
|
+
earnings_call_version = get_earnings_call_version()
|
51
59
|
return {
|
52
60
|
"User-Agent": f"EarningsCall Python/{earnings_call_version}",
|
53
61
|
"X-EarningsCall-Version": earnings_call_version,
|
earningscall/company.py
CHANGED
@@ -92,6 +92,9 @@ class Company:
|
|
92
92
|
transcript.text = " ".join(map(lambda spk: spk.text, transcript.speakers))
|
93
93
|
elif level == 4:
|
94
94
|
transcript.text = " ".join([transcript.prepared_remarks, transcript.questions_and_answers])
|
95
|
+
if transcript.speaker_name_map_v2:
|
96
|
+
for speaker in transcript.speakers:
|
97
|
+
speaker.speaker_info = transcript.speaker_name_map_v2.get(speaker.speaker)
|
95
98
|
return transcript
|
96
99
|
except requests.exceptions.HTTPError as error:
|
97
100
|
if error.response.status_code == 404:
|
earningscall/transcript.py
CHANGED
@@ -1,15 +1,23 @@
|
|
1
1
|
from dataclasses import dataclass, field
|
2
|
-
from typing import List, Optional
|
2
|
+
from typing import List, Optional, Dict
|
3
3
|
|
4
4
|
from dataclasses_json import dataclass_json
|
5
5
|
|
6
6
|
from earningscall.event import EarningsEvent
|
7
7
|
|
8
8
|
|
9
|
+
@dataclass_json
|
10
|
+
@dataclass
|
11
|
+
class SpeakerInfo:
|
12
|
+
name: str
|
13
|
+
title: str
|
14
|
+
|
15
|
+
|
9
16
|
@dataclass_json
|
10
17
|
@dataclass
|
11
18
|
class Speaker:
|
12
19
|
speaker: str
|
20
|
+
speaker_info: Optional[SpeakerInfo] = field(default=None)
|
13
21
|
text: Optional[str] = field(default=None)
|
14
22
|
words: Optional[List[str]] = field(default=None)
|
15
23
|
start_times: Optional[List[float]] = field(default=None)
|
@@ -23,3 +31,4 @@ class Transcript:
|
|
23
31
|
speakers: Optional[List[Speaker]] = field(default=None)
|
24
32
|
prepared_remarks: Optional[str] = field(default=None)
|
25
33
|
questions_and_answers: Optional[str] = field(default=None)
|
34
|
+
speaker_name_map_v2: Optional[Dict[str, SpeakerInfo]] = field(default=None)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: earningscall
|
3
|
-
Version: 0.0.
|
3
|
+
Version: 0.0.22
|
4
4
|
Summary: The EarningsCall Python library provides convenient access to the EarningsCall API. It includes a pre-defined set of classes for API resources that initialize themselves dynamically from API responses.
|
5
5
|
Project-URL: Homepage, https://earningscall.biz
|
6
6
|
Project-URL: Documentation, https://github.com/EarningsCall/earningscall-python
|
@@ -30,7 +30,6 @@ License: MIT License
|
|
30
30
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
31
31
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
32
32
|
SOFTWARE.
|
33
|
-
License-File: LICENSE
|
34
33
|
Keywords: earning call app,earnings call,earnings call api,earnings call app,earnings call transcript api,earnings call transcripts,earnings call transcripts api,earnings calls,earnings transcript api,listen to earnings calls,transcripts,where to listen to earnings calls
|
35
34
|
Classifier: Development Status :: 3 - Alpha
|
36
35
|
Classifier: Intended Audience :: Developers
|
@@ -95,6 +94,8 @@ Apple Inc. Q3 2021 Transcript Text: "Good day, and welcome to the Apple Q3 FY 20
|
|
95
94
|
|
96
95
|
|
97
96
|
```python
|
97
|
+
from datetime import datetime
|
98
|
+
|
98
99
|
from earningscall import get_company
|
99
100
|
|
100
101
|
company = get_company("aapl") # Lookup Apple, Inc by its ticker symbol, "AAPL"
|
@@ -102,6 +103,9 @@ company = get_company("aapl") # Lookup Apple, Inc by its ticker symbol, "AAPL"
|
|
102
103
|
print(f"Getting all transcripts for: {company}..")
|
103
104
|
# Retrieve all earnings conference call events for a company, and iterate through each one
|
104
105
|
for event in company.events():
|
106
|
+
if datetime.now().timestamp() < event.conference_date.timestamp():
|
107
|
+
print(f"* {company.company_info.symbol} Q{event.quarter} {event.year} -- skipping, conference date in the future")
|
108
|
+
continue
|
105
109
|
transcript = company.get_transcript(event=event) # Fetch the earnings call transcript for this event
|
106
110
|
print(f"* Q{event.quarter} {event.year}")
|
107
111
|
if transcript:
|
@@ -153,6 +157,38 @@ Speaker: spk11
|
|
153
157
|
Text: Good day, and welcome to the Apple Q3 FY 2021 Earnings Conference Call. Today's call is being recorded. At this time, for opening remarks and introductions, I would like to turn the call over to Tejas Ghala, Director, Investor Relations and Corporate Finance. Please go ahead.
|
154
158
|
```
|
155
159
|
|
160
|
+
|
161
|
+
## Get Text by Speaker with Speaker Name and Title
|
162
|
+
|
163
|
+
NOTE: This is a new experimental feature. It includes Speaker Names and Titles.
|
164
|
+
|
165
|
+
```python
|
166
|
+
from earningscall import get_company
|
167
|
+
|
168
|
+
company = get_company("aapl") # Lookup Apple, Inc by its ticker symbol, "AAPL"
|
169
|
+
|
170
|
+
transcript = company.get_transcript(year=2021, quarter=3, level=2)
|
171
|
+
|
172
|
+
speaker = transcript.speakers[1] # Get second speaker
|
173
|
+
speaker_label = speaker.speaker_info.name
|
174
|
+
text = speaker.text
|
175
|
+
print("Speaker:")
|
176
|
+
print(f" Name: {speaker.speaker_info.name}")
|
177
|
+
print(f" Title: {speaker.speaker_info.title}")
|
178
|
+
print()
|
179
|
+
print(f"Text: {text}")
|
180
|
+
```
|
181
|
+
|
182
|
+
Output
|
183
|
+
|
184
|
+
```text
|
185
|
+
Speaker:
|
186
|
+
Name: Tejas Ghala
|
187
|
+
Title: Director, Investor Relations and Corporate Finance
|
188
|
+
|
189
|
+
Text: Thank you. Good afternoon, and thank you for joining us. Speaking first today is Apple CEO Tim Cook, and he'll be followed by CFO Luca Maestri. After that, we'll open the call to questions from analysts. Please note that some of the information you'll hear during our discussion today will consist of forward-looking statements, including without limitation, those regarding revenue, gross margin, operating expenses, other income and expenses, taxes, capital allocation, and future business outlook, including the potential impact of COVID-19 on the company's business and results of operations. These statements involve risks and uncertainties that may cause actual results or trends to differ materially from our forecast. For more information, please refer to the risk factors discussed in Apple's most recently filed annual report on Form 10-K and the Form 8-K filed with the SEC today, along with the associated press release. Apple assumes no obligation to update any forward-looking statements or information which speak as of their respective dates. I'd like to now turn the call over to Tim for introductory remarks.
|
190
|
+
```
|
191
|
+
|
156
192
|
## Get Word-Level Timestamps
|
157
193
|
|
158
194
|
If you want to get the word-level timestamps, you can do so by setting the `level` parameter to `3`.
|
@@ -1,14 +1,14 @@
|
|
1
1
|
earningscall/__init__.py,sha256=0mANmPlE7LEWtOGzV2cmmlPfBIWBWlWRDkyqPHJ1jm8,333
|
2
|
-
earningscall/api.py,sha256=
|
3
|
-
earningscall/company.py,sha256=
|
2
|
+
earningscall/api.py,sha256=NkYtMO9yq870Y2s_hWZni-scdc3DA2MO4MyQDAFNgws,5152
|
3
|
+
earningscall/company.py,sha256=8HPM_UEoUUOW6mCESktBLpm63HydSk34GWyIv6vZdpw,6625
|
4
4
|
earningscall/errors.py,sha256=EA-d6qIYgQs9csp8JptQiAaYoM0M9HhCGJgKA9GAWPg,440
|
5
5
|
earningscall/event.py,sha256=Jf7KPvpeaF9KkeHe46LbL_HIYLXkyHrs3psq-ZY-bkI,692
|
6
6
|
earningscall/exports.py,sha256=i9UWHY6Lq1OzZTZX_1SdNzrNd_PSlPwpB337lGMK4oM,837
|
7
7
|
earningscall/sectors.py,sha256=Xd6DLkAQ_fQkC2s-N9pReC8b_M3iy77OoFftoZj9FWY,5114
|
8
8
|
earningscall/symbols.py,sha256=39tL7oP1HT8BturwKW7mgS33dX2Y_X8cw5GKK0aV02k,6354
|
9
|
-
earningscall/transcript.py,sha256=
|
9
|
+
earningscall/transcript.py,sha256=970kq1-cDOOyuY630bH1-nwWuPHv9K0gABH2HtCEddQ,943
|
10
10
|
earningscall/utils.py,sha256=Qx8KhlumUdzyBSZRKMS6vpWlb8MGZpLKA4OffJaMdCE,1032
|
11
|
-
earningscall-0.0.
|
12
|
-
earningscall-0.0.
|
13
|
-
earningscall-0.0.
|
14
|
-
earningscall-0.0.
|
11
|
+
earningscall-0.0.22.dist-info/METADATA,sha256=gaiZWluFyCgXDXxuuZpO5TsNhmulf62TaM8Opwq2CfY,13106
|
12
|
+
earningscall-0.0.22.dist-info/WHEEL,sha256=C2FUgwZgiLbznR-k0b_5k3Ai_1aASOXDss3lzCUsUug,87
|
13
|
+
earningscall-0.0.22.dist-info/licenses/LICENSE,sha256=ktEB_UcRMg2cQlX9wiDs544xWncWizwS9mEZuGsCLrM,1069
|
14
|
+
earningscall-0.0.22.dist-info/RECORD,,
|
File without changes
|