earningscall 0.0.26__tar.gz → 1.0.1__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 (65) hide show
  1. {earningscall-0.0.26 → earningscall-1.0.1}/CHANGELOG.md +8 -0
  2. {earningscall-0.0.26 → earningscall-1.0.1}/PKG-INFO +1 -1
  3. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/api.py +13 -1
  4. {earningscall-0.0.26 → earningscall-1.0.1}/pyproject.toml +1 -1
  5. earningscall-1.0.1/tests/test_api.py +9 -0
  6. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_download_audio_files.py +2 -0
  7. {earningscall-0.0.26 → earningscall-1.0.1}/.github/workflows/release.yml +0 -0
  8. {earningscall-0.0.26 → earningscall-1.0.1}/.github/workflows/test.yml +0 -0
  9. {earningscall-0.0.26 → earningscall-1.0.1}/.gitignore +0 -0
  10. {earningscall-0.0.26 → earningscall-1.0.1}/.python-version +0 -0
  11. {earningscall-0.0.26 → earningscall-1.0.1}/DEVELOPMENT.md +0 -0
  12. {earningscall-0.0.26 → earningscall-1.0.1}/LICENSE +0 -0
  13. {earningscall-0.0.26 → earningscall-1.0.1}/README.md +0 -0
  14. {earningscall-0.0.26 → earningscall-1.0.1}/TODO.md +0 -0
  15. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/__init__.py +0 -0
  16. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/company.py +0 -0
  17. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/errors.py +0 -0
  18. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/event.py +0 -0
  19. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/exports.py +0 -0
  20. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/sectors.py +0 -0
  21. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/symbols.py +0 -0
  22. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/transcript.py +0 -0
  23. {earningscall-0.0.26 → earningscall-1.0.1}/earningscall/utils.py +0 -0
  24. {earningscall-0.0.26 → earningscall-1.0.1}/hatch.toml +0 -0
  25. {earningscall-0.0.26 → earningscall-1.0.1}/scripts/download_audio_files.py +0 -0
  26. {earningscall-0.0.26 → earningscall-1.0.1}/scripts/download_single_audio_file.py +0 -0
  27. {earningscall-0.0.26 → earningscall-1.0.1}/scripts/download_sp500_audio_files.py +0 -0
  28. {earningscall-0.0.26 → earningscall-1.0.1}/scripts/get_all_company_transcripts.py +0 -0
  29. {earningscall-0.0.26 → earningscall-1.0.1}/scripts/get_single_transcript.py +0 -0
  30. {earningscall-0.0.26 → earningscall-1.0.1}/scripts/list_companies.py +0 -0
  31. {earningscall-0.0.26 → earningscall-1.0.1}/setup.cfg +0 -0
  32. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/aapl-q1-2022-advanced-data-level-2.yaml +0 -0
  33. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/aapl-q1-2022-advanced-data-level-3.yaml +0 -0
  34. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/aapl-q1-2022-advanced-data-level-4.yaml +0 -0
  35. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/aapl-q1-2022-speaker-name-map-v2.yaml +0 -0
  36. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/aapl-q1-2030-not-authorized-l2.yaml +0 -0
  37. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/aapl-q1-2030-not-authorized.yaml +0 -0
  38. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/aapl-q1-2030-not-found.yaml +0 -0
  39. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/aapl-q1-2030-server-error.yaml +0 -0
  40. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/demo-symbols-v2-alpha.yaml +0 -0
  41. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/demo-symbols-v2.yaml +0 -0
  42. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/meta-q3-2024-not-authorized.yaml +0 -0
  43. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/meta-q3-2024-not-found.yaml +0 -0
  44. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/meta-q3-2024-other-error.yaml +0 -0
  45. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/msft-company-events.yaml +0 -0
  46. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/msft-q1-2022-audio-file-short-clip.yaml +0 -0
  47. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/msft-transcript-response.yaml +0 -0
  48. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/sp500-company-list-failed.yaml +0 -0
  49. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/sp500-company-list.yaml +0 -0
  50. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/symbols-v2-missing-edge-cases.yaml +0 -0
  51. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/symbols-v2.yaml +0 -0
  52. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/symbols.txt +0 -0
  53. {earningscall-0.0.26 → earningscall-1.0.1}/tests/data/symbols.yaml +0 -0
  54. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_company.py +0 -0
  55. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_earnings_event.py +0 -0
  56. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_errors.py +0 -0
  57. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_exports.py +0 -0
  58. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_get_company_events.py +0 -0
  59. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_get_sp500_companies_api.py +0 -0
  60. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_get_transcript.py +0 -0
  61. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_helper.py +0 -0
  62. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_responses_mocking.py +0 -0
  63. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_sectors.py +0 -0
  64. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_symbols.py +0 -0
  65. {earningscall-0.0.26 → earningscall-1.0.1}/tests/test_utils.py +0 -0
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## Release `1.0.1` - 2024-12-20
4
+
5
+ * Update User-Agent string to standardized format used in the industry.
6
+
7
+ ## Release `1.0.0` - 2024-12-16
8
+
9
+ * Release the first major version of EarningsCall.
10
+
3
11
  ## Release `0.0.26` - 2024-12-15
4
12
 
5
13
  * Bump gh-action-sigstore-python to version 3.0.0.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: earningscall
3
- Version: 0.0.26
3
+ Version: 1.0.1
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
@@ -1,4 +1,5 @@
1
1
  import importlib
2
+ import platform
2
3
  import urllib.parse
3
4
  import logging
4
5
  import os
@@ -61,10 +62,21 @@ def get_earnings_call_version():
61
62
  return None
62
63
 
63
64
 
65
+ def get_user_agent():
66
+ sdk_name = "EarningsCallPython"
67
+ sdk_version = get_earnings_call_version()
68
+ python_version = platform.python_version()
69
+ os_info = f"{platform.system()} {platform.release()}"
70
+ arch = platform.machine()
71
+ requests_version = requests.__version__
72
+ user_agent = f"{sdk_name}/{sdk_version} (Python/{python_version}; {os_info}; {arch}) Requests/{requests_version}"
73
+ return user_agent
74
+
75
+
64
76
  def get_headers():
65
77
  earnings_call_version = get_earnings_call_version()
66
78
  return {
67
- "User-Agent": f"EarningsCall Python/{earnings_call_version}",
79
+ "User-Agent": get_user_agent(),
68
80
  "X-EarningsCall-Version": earnings_call_version,
69
81
  }
70
82
 
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "earningscall"
3
- version = "0.0.26"
3
+ version = "1.0.1"
4
4
  description = "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
  readme = "README.md"
6
6
  authors = [
@@ -0,0 +1,9 @@
1
+ from earningscall.api import get_user_agent
2
+
3
+
4
+ def test_get_user_agent():
5
+ user_agent = get_user_agent()
6
+ assert user_agent is not None
7
+ assert "EarningsCallPython/" in user_agent
8
+ assert "Python" in user_agent
9
+ assert "Requests" in user_agent
@@ -47,6 +47,7 @@ def test_download_audio_file():
47
47
  #
48
48
  assert os.path.exists(file_name)
49
49
  assert os.path.getsize(file_name) > 0
50
+ os.unlink(file_name)
50
51
 
51
52
 
52
53
  @responses.activate
@@ -61,6 +62,7 @@ def test_download_audio_file_event():
61
62
  #
62
63
  assert os.path.exists(file_name)
63
64
  assert os.path.getsize(file_name) > 0
65
+ os.unlink(file_name)
64
66
 
65
67
 
66
68
  def test_download_audio_file_missing_params_raises_value_error():
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes