Registry / data / faker-marketdata

faker-marketdata

JSON →
library0.4pypypi✓ verified 89d ago

A Faker provider that generates realistic financial market data such as tickers, ISINs, CUSIPs, SEDOLs, currencies, and market indices. Version 0.4 supports Python 3.6+ and requires the Faker library. Release cadence is low; updates are infrequent.

pip install faker-marketdata
INSTALL
IMPORT
SIG · FAKER-MARKETDATA
F
faker-marketdata
datapythonv0.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

MarketDataProvider
✓ from faker_marketdata import MarketDataProvider

Initialize Faker with the MarketData provider and generate sample financial instruments.

from faker import Faker from faker_marketdata import MarketDataProvider fake = Faker() fake.add_provider(MarketDataProvider) # Generate a stock ticker print(fake.bbg_ticker()) # example: 'AAPL US Equity' print(fake.isin()) # example: 'US0378331005' print(fake.cusip()) # example: '037833100' print(fake.sedol()) # example: 'B03MLW9' print(fake.currency()) # example: 'USD' print(fake.market_index()) # example: 'S&P 500'
Debug
Known issues
gotchaFaker must be installed before or alongside faker-marketdata. The provider will not work without the Faker package.
fix
Ensure Faker is installed: `pip install Faker faker-marketdata`
affects: >=0.1
gotchaThe provider methods (bbg_ticker, isin, etc.) are only available after adding the provider to a Faker instance. They are not top-level functions.
fix
Call `fake.add_provider(MarketDataProvider)` before generating data.
affects: >=0.1
deprecatedThis library has not been updated since 2022 and may not be actively maintained. Check for compatibility with newer Faker versions.
fix
Consider testing with your version of Faker or pinning Faker to a known compatible version.
affects: 0.4
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'faker_marketdata'
The library is not installed or the Python environment does not have it.
fix
Run 'pip install faker-marketdata'.
ImportError: cannot import name 'MarketDataProvider' from 'faker_marketdata'
Incorrect import path or the library version is too old.
fix
Use 'from faker_marketdata import MarketDataProvider'. Ensure version >=0.2.
AttributeError: 'Faker' object has no attribute 'bbg_ticker'
The provider was not added to the Faker instance.
fix
Add 'fake.add_provider(MarketDataProvider)' before calling the method.
Upgrade
Version history
0.4latest on PyPI · released Apr 13, 2023
Audit
Dependencies
FakerrequiredRequired to use the provider; Faker must be installed separately.
Agent activity
7 hits · last 30 days
node
6
Resources
faker-marketdata — pip install faker-marketdata · libregistry