API for accessing Gurufocus data packages, please go to https://www.gurufocus.com/user/me?tab=account&subtab=api-token to view or generate authorization keys.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1.0.0
- Package version: 1.0.0
- Generator version: 7.12.0
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Python 3.8+
If the python package is hosted on a repository, you can install directly using:
pip install git+https://github.com/gurufocus/data-package-python.git
(you may need to run pip
with root permission: sudo pip install git+https://github.com/gurufocus/data-package-python.git
)
Then import the package:
import openapi_client
Install via Setuptools.
python setup.py install --user
(or sudo python setup.py install
to install the package for all users)
Then import the package:
import openapi_client
Execute pytest
to run the tests.
Please follow the installation procedure and then run the following:
import openapi_client
from openapi_client.rest import ApiException
from pprint import pprint
# Defining the host is optional and defaults to https://api.gurufocus.com/data
# See configuration.py for a list of all supported configuration parameters.
configuration = openapi_client.Configuration(
host = "https://api.gurufocus.com/data"
)
# The client must configure the authentication and authorization parameters
# in accordance with the API server security policy.
# Examples for each auth method are provided below, use the example that
# satisfies your auth use case.
# Configure API key authorization: ApiKeyAuth
configuration.api_key['ApiKeyAuth'] = os.environ["API_KEY"]
# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
# configuration.api_key_prefix['ApiKeyAuth'] = 'Bearer'
# Enter a context with an instance of the API client
with openapi_client.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = openapi_client.DataPackagesApi(api_client)
id = 'ebe74eed-6a33-4988-b94f-c7afb6b3e919' # str | Data package ID
try:
# Get download url of the data package
api_response = api_instance.download_id_get(id)
print("The response of DataPackagesApi->download_id_get:\n")
pprint(api_response)
except ApiException as e:
print("Exception when calling DataPackagesApi->download_id_get: %s\n" % e)
All URIs are relative to https://api.gurufocus.com/data
Class | Method | HTTP request | Description |
---|---|---|---|
DataPackagesApi | download_id_get | GET /download/{id} | Get download url of the data package |
DataPackagesApi | download_list_get | GET /download/list | List available data packages |
ETFApi | etf_symbol_get | GET /etf/{symbol} | ETF profile, key statistics and holdings. |
GURUApi | gurus_id_get | GET /gurus/{id} | Access the holdings and trades of over 4,500 institutional investors, enabling broad market trend analysis or fueling investment research tools with extensive institutional activity data |
GURUApi | gurus_list_get | GET /gurus/list | Get the list of available gurus' basic information |
INSIDERApi | insiders_date_get | GET /insiders/{date} | A comprehensive record of insider trading and institutional ownership for investment research or powering data-driven financial tools that track executive trading behavior over time |
STOCKApi | stocks_symbol_fundamentals_get | GET /stocks/{symbol}/fundamentals | Complete historical financial statements providing the data needed for in-depth analysis, valuation modeling, and building investment research platforms. |
STOCKApi | stocks_symbol_profile_get | GET /stocks/{symbol}/profile | Access essential company details and current valuation metrics to power investment platforms, populate company directories, or enhance financial analysis tools with up-to-date market data. |
STOCKApi | stocks_symbol_rankings_get | GET /stocks/{symbol}/rankings | Proprietary scoring and ranking systems that assess company quality, valuation, and performance for powering data-driven investment platforms. |
STOCKApi | stocks_symbol_segment_get | GET /stocks/{symbol}/segment | Gain insights into a company's revenue breakdown by product and geography to build detailed financial visualizations, enhance stock research platforms, or create data-driven market analysis tools |
STOCKApi | stocks_symbol_valuations_get | GET /stocks/{symbol}/valuations | A deep dataset of historical valuation metrics to support investors and entrepreneurs in the development of data-driven investment platforms. |
- DownloadIdGet200Response
- DownloadListGet200ResponseInner
- DownloadListGet403Response
- DownloadListGet404Response
- DownloadListGet500Response
- EtfEtfBasicInformation
- EtfEtfDividends
- EtfEtfFundamental
- EtfEtfKeyStatistics
- EtfEtfPortfolioHoldings
- EtfEtfSectorBreakdowns
- EtfSymbolGet200Response
- FundamentalsINOREITNODIRECT
- FundamentalsINOREITNODIRECTBalanceSheet
- FundamentalsINOREITNODIRECTBasicInformation
- FundamentalsINOREITNODIRECTCashflowStatement
- FundamentalsINOREITNODIRECTIncomeStatement
- FundamentalsIREITNODIRECT
- FundamentalsIREITNODIRECTBalanceSheet
- FundamentalsIREITNODIRECTBasicInformation
- FundamentalsIREITNODIRECTCashflowStatement
- FundamentalsIREITNODIRECTIncomeStatement
- FundamentalsNNOREITDIRECT
- FundamentalsNNOREITDIRECTBalanceSheet
- FundamentalsNNOREITDIRECTBasicInformation
- FundamentalsNNOREITDIRECTCashflowStatement
- FundamentalsNNOREITDIRECTIncomeStatement
- FundamentalsNNOREITNODIRECT
- FundamentalsNNOREITNODIRECTBalanceSheet
- FundamentalsNNOREITNODIRECTBasicInformation
- FundamentalsNNOREITNODIRECTCashflowStatement
- FundamentalsNNOREITNODIRECTIncomeStatement
- FundamentalsNREITDIRECT
- FundamentalsNREITDIRECTBalanceSheet
- FundamentalsNREITDIRECTBasicInformation
- FundamentalsNREITDIRECTCashflowStatement
- FundamentalsNREITDIRECTIncomeStatement
- FundamentalsNREITNODIRECT
- FundamentalsNREITNODIRECTBalanceSheet
- FundamentalsNREITNODIRECTBasicInformation
- FundamentalsNREITNODIRECTCashflowStatement
- FundamentalsNREITNODIRECTIncomeStatement
- GuruTransaction
- GurusIdGet200Response
- GurusListGet200Response
- GurusListGet200ResponseDataInner
- InsiderTransaction
- StockFundamentalsAnnuallyInner
- StockFundamentalsBasicInformation
- StockFundamentalsTtm
- StockProfileBasicInformation
- StockProfileDividends
- StockProfileFundamental
- StockProfileGeneral
- StockProfileGrowth
- StockProfilePrice
- StockProfileProfitability
- StockProfileValuationRatio
- StockRankingsBasicInformation
- StockRankingsGuruFocusRankings
- StockSegmentBasicInformation
- StockValuationsAnnuallyInner
- StockValuationsBasicInformation
- StockValuationsTtm
- StocksSymbolFundamentalsGet200Response
- StocksSymbolProfileGet200Response
- StocksSymbolRankingsGet200Response
- StocksSymbolSegmentGet200Response
- StocksSymbolValuationsGet200Response
- ValuationsINOREITNODIRECT
- ValuationsINOREITNODIRECTBasicInformation
- ValuationsINOREITNODIRECTPerShareData
- ValuationsINOREITNODIRECTRatios
- ValuationsINOREITNODIRECTValuationRatios
- ValuationsINOREITNODIRECTValuationandQuality
- ValuationsIREITNODIRECT
- ValuationsIREITNODIRECTBasicInformation
- ValuationsIREITNODIRECTPerShareData
- ValuationsIREITNODIRECTRatios
- ValuationsIREITNODIRECTValuationRatios
- ValuationsIREITNODIRECTValuationandQuality
- ValuationsNNOREITDIRECT
- ValuationsNNOREITDIRECTBasicInformation
- ValuationsNNOREITDIRECTPerShareData
- ValuationsNNOREITDIRECTRatios
- ValuationsNNOREITDIRECTValuationRatios
- ValuationsNNOREITDIRECTValuationandQuality
- ValuationsNNOREITNODIRECT
- ValuationsNNOREITNODIRECTBasicInformation
- ValuationsNNOREITNODIRECTPerShareData
- ValuationsNNOREITNODIRECTRatios
- ValuationsNNOREITNODIRECTValuationRatios
- ValuationsNNOREITNODIRECTValuationandQuality
- ValuationsNREITDIRECT
- ValuationsNREITDIRECTBasicInformation
- ValuationsNREITDIRECTPerShareData
- ValuationsNREITDIRECTRatios
- ValuationsNREITDIRECTValuationRatios
- ValuationsNREITDIRECTValuationandQuality
- ValuationsNREITNODIRECT
- ValuationsNREITNODIRECTBasicInformation
- ValuationsNREITNODIRECTPerShareData
- ValuationsNREITNODIRECTRatios
- ValuationsNREITNODIRECTValuationRatios
- ValuationsNREITNODIRECTValuationandQuality
Authentication schemes defined for the API:
- Type: API key
- API key parameter name: Authorization
- Location: HTTP header