No project description provided
Project description
JPX Data Retriever
The JPX Data Retriever is a Python module designed to obtain and process the Japanese stock list from the Japan Exchange Group (JPX) website. It efficiently downloads, caches, and parses the stock data into a pandas DataFrame, making it easy for analysts and developers to integrate JPX stock information into their applications.
Features
- Downloads the latest JPX stock list directly from the JPX website.
- Caches the downloaded data locally and checks for updates every 30 days.
- Processes the downloaded Excel file into a pandas DataFrame.
- Filters the data to provide only stocks listed on the Prime Market.
Installation
To use the JPX Data Retriever, ensure you have the following prerequisites:
- Python 3.x
- Required Python packages:
pandas,urllib3,beautifulsoup4,platformdirs
Install the necessary packages using pip:
pip install pandas urllib3 beautifulsoup4 platformdirs
Usage
To retrieve and display the JPX Prime Market stock list, run the following script:
from myhappydays.investment.jpx_code import JPXDataRetriever
retriever = JPXDataRetriever()
try:
stock_list_df = retriever.get_prime_market_list()
print("Successfully retrieved data.")
print(f"Cache file location: {retriever.cache_file}")
print("\nFirst 5 entries:")
print(stock_list_df.head())
except (JPXDataDownloadError, JPXDataAccessError, FileNotFoundError) as e:
print(f"Error: {e}")
Classes
JPXDataRetriever
- Purpose: Handles the retrieval, caching, and processing of JPX stock data.
- Key Methods:
get_prime_market_list(): Returns the JPX Prime Market stock list as a pandas DataFrame.
JPXDataDownloadError
- Purpose: Raised when a network-level error occurs during data download.
JPXDataAccessError
- Purpose: Raised when the data cannot be accessed due to page structure changes, missing files, or unreadable content.
License
This project is open-sourced and available for use under the MIT License. See the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file myhappydays_investment_jpx_code-0.1.0.tar.gz.
File metadata
- Download URL: myhappydays_investment_jpx_code-0.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed5563fd1b549a7b028d5e3e369a6c18706f80c82cde4d775cddc893a8fb23fe
|
|
| MD5 |
52ed4a74c0cf24b3819a1e7b481039cd
|
|
| BLAKE2b-256 |
ec6ea5259430f0874ec4f8a8471634002482f5b8922728cf69c3144ce32e522f
|
Provenance
The following attestation bundles were made for myhappydays_investment_jpx_code-0.1.0.tar.gz:
Publisher:
test.yml on takushi1969/myhappydays-investment-jpx_code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
myhappydays_investment_jpx_code-0.1.0.tar.gz -
Subject digest:
ed5563fd1b549a7b028d5e3e369a6c18706f80c82cde4d775cddc893a8fb23fe - Sigstore transparency entry: 705327123
- Sigstore integration time:
-
Permalink:
takushi1969/myhappydays-investment-jpx_code@ac87e67134ae57fa4f5cd02bb0d310a9638f654b -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/takushi1969
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yml@ac87e67134ae57fa4f5cd02bb0d310a9638f654b -
Trigger Event:
push
-
Statement type:
File details
Details for the file myhappydays_investment_jpx_code-0.1.0-py3-none-any.whl.
File metadata
- Download URL: myhappydays_investment_jpx_code-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1777c128a732c0bb3f1c9641293df85b6d78ee3d58e976d6ff538f28aae60a15
|
|
| MD5 |
56cab7b5e44b2ba32972134e291cf276
|
|
| BLAKE2b-256 |
f5d3e1c0db1971060ee2fbd6c6c1a2b4ca104a2d1684f9230c68fc8de25efa85
|
Provenance
The following attestation bundles were made for myhappydays_investment_jpx_code-0.1.0-py3-none-any.whl:
Publisher:
test.yml on takushi1969/myhappydays-investment-jpx_code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
myhappydays_investment_jpx_code-0.1.0-py3-none-any.whl -
Subject digest:
1777c128a732c0bb3f1c9641293df85b6d78ee3d58e976d6ff538f28aae60a15 - Sigstore transparency entry: 705327127
- Sigstore integration time:
-
Permalink:
takushi1969/myhappydays-investment-jpx_code@ac87e67134ae57fa4f5cd02bb0d310a9638f654b -
Branch / Tag:
refs/heads/develop - Owner: https://github.com/takushi1969
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
test.yml@ac87e67134ae57fa4f5cd02bb0d310a9638f654b -
Trigger Event:
push
-
Statement type: