fuggers_py.adapters¶
Boundary-layer adapters for files, storage, JSON, and external integration.
.. py:module:: fuggers_py.adapters
External-boundary adapters for files, storage, codecs, and transport.
This namespace exposes the concrete adapters used to load, persist, encode, and move data across the library boundary. The public surface is intentionally small and re-exports the file, JSON, SQLite, storage, and transport building blocks from their implementation modules.
.. py:exception:: AlreadyExistsError(message=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.errors.AlreadyExistsError
.. py:class:: AsyncTransport(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.transport.AsyncTransport
Protocol for asynchronous byte-oriented request/response transports.
This mirrors :class:Transport but allows the implementation to perform
I/O asynchronously.
.. py:class:: AuditEntry(action, entity_type, entity_id, timestamp, actor=None, details=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.AuditEntry
Audit log entry stored alongside other persistence records.
:type action: :sphinx_autodoc_typehints_type:\:py\:class\:\str` :param action: Action that occurred, such as ``upsert`` or ``delete``. :type entity_type: :sphinx_autodoc_typehints_type::py:class:`str` :param entity_type: Type of entity that was changed. :type entity_id: :sphinx_autodoc_typehints_type::py:class:`str` :param entity_id: Identifier of the changed entity. :type timestamp: :sphinx_autodoc_typehints_type::py:class:`~datetime.datetime` :param timestamp: Timestamp for the event. :type actor: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None` :param actor: Optional actor responsible for the change. :type details: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param details: Optional free-text detail payload.
.. py:class:: AuditStore(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.AuditStore
Protocol for audit-log persistence.
.. py:class:: BondStore(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.BondStore
Protocol for bond-reference persistence.
Implementations return normalized bond reference data and support cursor-based listing when multiple records are available.
.. py:class:: CSVBondReferenceSource(path) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.CSVBondReferenceSource
CSV-backed bond reference source.
The CSV is parsed once and stored as normalized bond reference records keyed by instrument id.
.. py:method:: CSVBondReferenceSource.get_bond_reference(instrument_id) :module: fuggers_py.adapters
Return the bond reference matching ``instrument_id``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.reference.reference\_data.BondReferenceData\` \| \:py\:obj\:\`None\``
.. py:class:: CSVEtfHoldingsSource(path) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.CSVEtfHoldingsSource
CSV-backed ETF holdings source.
Holdings are grouped by ETF id and returned as a deterministic tuple.
.. py:method:: CSVEtfHoldingsSource.get_etf_holdings(etf_id) :module: fuggers_py.adapters
Return ETF holdings for the requested ETF identifier.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`tuple\`\\ \\\[\:py\:class\:\`\~fuggers\_py.market.market\_data.EtfHolding\`\, \:py\:data\:\`...\<Ellipsis\>\`\]`
.. py:class:: CSVEtfQuoteSource(path) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.CSVEtfQuoteSource
CSV-backed ETF quote source.
Quotes are loaded once at construction and then queried from memory.
.. py:method:: CSVEtfQuoteSource.get_etf_quote(etf_id) :module: fuggers_py.adapters
Return the ETF quote matching ``etf_id``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.market.market\_data.EtfQuote\` \| \:py\:obj\:\`None\``
.. py:class:: CSVIndexFixingSource(path) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.CSVIndexFixingSource
CSV-backed index fixing source.
The source reads the CSV once and resolves fixings from the in-memory copy.
.. py:method:: CSVIndexFixingSource.get_fixing(index_name, fixing_date) :module: fuggers_py.adapters
Return the fixing matching ``index_name`` and ``fixing_date``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.market.market\_data.IndexFixing\` \| \:py\:obj\:\`None\``
.. py:method:: CSVIndexFixingSource.get_rate(index_name, fixing_date) :module: fuggers_py.adapters
Return the fixing value for ``index_name`` and ``fixing_date``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~decimal.Decimal\` \| \:py\:obj\:\`None\``
.. py:class:: CSVIssuerReferenceSource(path) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.CSVIssuerReferenceSource
CSV-backed issuer reference source.
.. py:method:: CSVIssuerReferenceSource.get_issuer_reference(issuer_name) :module: fuggers_py.adapters
Return the issuer reference matching ``issuer_name``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.reference.reference\_data.IssuerReferenceData\` \| \:py\:obj\:\`None\``
.. py:class:: CSVQuoteSource(path) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.CSVQuoteSource
CSV-backed quote source that delegates to :class:InMemoryQuoteSource.
The file is read once at construction time. Subsequent lookups are served from the in-memory source, which keeps side effects limited to the initial file load.
.. py:method:: CSVQuoteSource.get_quote(instrument_id, side=QuoteSide.MID) :module: fuggers_py.adapters
Return the quote matching ``instrument_id`` and ``side``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.market.market\_data.RawQuote\` \| \:py\:obj\:\`None\``
.. py:class:: CSVRatingSource(path) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.CSVRatingSource
CSV-backed rating source.
Ratings are indexed by instrument id and issuer name so either lookup path can be served from the same file-backed cache.
.. py:method:: CSVRatingSource.get_rating(*, instrument_id=None, issuer_name=None) :module: fuggers_py.adapters
Return a rating by instrument id or issuer name.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.reference.reference\_data.RatingRecord\` \| \:py\:obj\:\`None\``
.. py:class:: CacheTransport(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.transport.CacheTransport
Protocol for cache transport with optional TTL semantics.
Payloads are raw bytes, and callers may supply a time-to-live in seconds when the backend supports expiring entries.
.. py:class:: Codec(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.transport.Codec
Protocol for byte-oriented codecs.
Implementations convert Python values into transport-safe bytes payloads
and reconstruct values from those payloads on decode.
.. py:class:: ConfigStore(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.ConfigStore
Protocol for pricing and engine configuration persistence.
.. py:exception:: ConnectionFailureError(message=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.errors.ConnectionFailureError
.. py:class:: CurveConfig(curve_id, curve_kind=’zero’, interpolation=’linear’, source=None, description=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.CurveConfig
Configuration record for a stored curve.
:type curve_id: :sphinx_autodoc_typehints_type:\:py\:class\:\~fuggers_py.core.ids.CurveId` :param curve_id: Normalized curve identifier. :type curve_kind: :sphinx_autodoc_typehints_type::py:class:`str` :param curve_kind: Logical curve family such as ``zero`` or ``forward``. :type interpolation: :sphinx_autodoc_typehints_type::py:class:`str` :param interpolation: Interpolation label used by the curve consumer. :type source: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None` :param source: Optional provenance label for the stored record. :type description: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param description: Optional human-readable description.
.. py:class:: CurveSnapshot(curve_id, reference_date, points, as_of=None, timestamp=None, source=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.CurveSnapshot
Stored curve snapshot with deterministic point ordering.
:type curve_id: :sphinx_autodoc_typehints_type:\:py\:class\:\~fuggers_py.core.ids.CurveId` :param curve_id: Normalized curve identifier. :type reference_date: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.types.Date` :param reference_date: Curve reference date used to interpret the snapshot. :type points: :sphinx_autodoc_typehints_type::py:class:`tuple`\ \[:py:class:`~fuggers_py.market.market_data.CurvePoint`, :py:data:`…<Ellipsis>`] :param points: Curve points stored in deterministic tenor/value order. :type as_of: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.types.Date` | :py:obj:`None` :param as_of: Optional as-of date for the snapshot record. :type timestamp: :sphinx_autodoc_typehints_type::py:class:`~datetime.datetime` | :py:obj:`None` :param timestamp: Optional capture timestamp. :type source: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param source: Optional provenance label for the stored snapshot.
.. py:class:: CurveStore(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.CurveStore
Protocol for curve configuration and snapshot persistence.
Curve configs identify how a curve should be interpreted, while snapshots store the dated point set used by downstream consumers.
.. py:class:: EmptyBondReferenceSource() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.EmptyBondReferenceSource
Empty bond reference source used as a no-op fallback.
.. py:class:: EmptyEtfHoldingsSource() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.EmptyEtfHoldingsSource
Empty ETF holdings source used as a no-op fallback.
.. py:class:: EmptyIssuerReferenceSource() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.EmptyIssuerReferenceSource
Empty issuer reference source used as a no-op fallback.
.. py:class:: EmptyRatingSource() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.EmptyRatingSource
Empty rating source used as a no-op fallback.
.. py:class:: InMemoryPortfolioStore(portfolios=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.portfolio_store.InMemoryPortfolioStore
Deterministic in-memory portfolio store.
The store keeps one record per portfolio id and as-of date. When no as-of date is supplied on lookup, the latest record according to the deterministic sort key is returned.
.. py:method:: InMemoryPortfolioStore.upsert_portfolio(portfolio) :module: fuggers_py.adapters
Insert or replace a stored portfolio.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.StoredPortfolio\``
.. py:method:: InMemoryPortfolioStore.get_portfolio(portfolio_id, as_of=None) :module: fuggers_py.adapters
Return the matching portfolio, preferring the latest as-of record.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.StoredPortfolio\` \| \:py\:obj\:\`None\``
.. py:method:: InMemoryPortfolioStore.list_portfolios(portfolio_filter=None, pagination=None) :module: fuggers_py.adapters
Return a paginated, deterministically ordered portfolio list.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.adapters.storage.StoredPortfolio\`\]`
.. py:method:: InMemoryPortfolioStore.count_portfolios(portfolio_filter=None) :module: fuggers_py.adapters
Count portfolios that match the optional filter.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`int\``
.. py:method:: InMemoryPortfolioStore.delete_portfolio(portfolio_id, as_of=None) :module: fuggers_py.adapters
Delete a portfolio by id and optional as-of date.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`bool\``
.. py:exception:: InvalidInputError(message=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.errors.InvalidInputError
.. py:class:: JSONCurveInputSource(path) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.JSONCurveInputSource
JSON-backed curve-input source that delegates to :class:InMemoryCurveSource.
The file is loaded once during initialization and then queried from memory.
.. py:method:: JSONCurveInputSource.get_curve_inputs(curve_id) :module: fuggers_py.adapters
Return the curve inputs matching ``curve_id``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.market.market\_data.CurveInputs\` \| \:py\:obj\:\`None\``
.. py:method:: JSONCurveInputSource.get_reference_curve(curve_id) :module: fuggers_py.adapters
Return the reference curve matching ``curve_id``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.market.market\_data.CurveInputs\` \| \:py\:obj\:\`None\``
.. py:class:: JsonCodec(*, indent=None, sort_keys=True) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.json_codec.JsonCodec
Compact JSON codec with dataclass-aware encoding.
Encoded payloads are UTF-8 bytes. The transport boundary is bytes-oriented
even though decode also accepts text for convenience in tests and
storage adapters.
:type indent: :sphinx_autodoc_typehints_type:\:py\:class\:\int` | :py:obj:`None` :param indent: Optional indentation level used when encoding JSON text. :type sort_keys: :sphinx_autodoc_typehints_type::py:class:`bool``
:param sort_keys: Whether dictionary keys should be emitted in sorted order.
.. py:method:: JsonCodec.encode(value) :module: fuggers_py.adapters
Encode a Python value into UTF-8 JSON bytes.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`bytes\``
.. py:method:: JsonCodec.decode(payload) :module: fuggers_py.adapters
Decode JSON bytes or text back into Python values.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`object\``
.. py:class:: NoOpAlertPublisher() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.NoOpAlertPublisher
Alert publisher that intentionally drops all messages.
.. py:class:: NoOpAnalyticsPublisher() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.NoOpAnalyticsPublisher
Analytics publisher that intentionally drops all messages.
.. py:class:: NoOpCurvePublisher() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.NoOpCurvePublisher
Curve publisher that intentionally drops all messages.
.. py:class:: NoOpEtfPublisher() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.NoOpEtfPublisher
ETF publisher that intentionally drops all messages.
.. py:class:: NoOpQuotePublisher() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.file.NoOpQuotePublisher
Quote publisher that intentionally drops all messages.
.. py:class:: OverrideRecord(scope_id, field_name, value, side=None, effective_date=None, numeric_value=None, source=None, reason=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.OverrideRecord
Override record with string and optional numeric payload values.
:type scope_id: :sphinx_autodoc_typehints_type:\:py\:class\:\str` :param scope_id: Override scope, such as a desk, strategy, or portfolio id. :type field_name: :sphinx_autodoc_typehints_type::py:class:`str` :param field_name: Name of the overridden field. :type value: :sphinx_autodoc_typehints_type::py:class:`str` :param value: Stored override value as text. :type side: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.market.state.QuoteSide` | :py:obj:`None` :param side: Optional quote side when the override applies to a market quote. :type effective_date: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.types.Date` | :py:obj:`None` :param effective_date: Optional date from which the override applies. :type numeric_value: :sphinx_autodoc_typehints_type::py:class:`~decimal.Decimal` | :py:obj:`None` :param numeric_value: Optional parsed numeric form of ``value`` stored as a raw decimal. :type source: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None` :param source: Optional provenance label. :type reason: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param reason: Optional free-text explanation.
.. py:class:: OverrideStore(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.OverrideStore
Protocol for override persistence.
.. py:class:: Page(items, pagination=None, total_items=None, next_cursor=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.Page
Paginated result page.
:type items: :sphinx_autodoc_typehints_type:\:py\:class\:\tuple`\ \[:py:class:`~typing.TypeVar`\ \(``T``), :py:data:`…<Ellipsis>`] :param items: Records in the current page, ordered according to the backing store. :type pagination: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.adapters.storage.Pagination` | :py:obj:`None` :param pagination: Pagination request that produced the page. :type total_items: :sphinx_autodoc_typehints_type::py:class:`int` | :py:obj:`None` :param total_items: Total number of matching records across all pages. :type next_cursor: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param next_cursor: Cursor for the next page, or None when no further page exists.
.. py:method:: Page.from_sequence(items, pagination) :module: fuggers_py.adapters :classmethod:
Slice a sequence using cursor-as-offset pagination semantics.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~typing.TypeVar\`\\ \\\(\`\`T\`\`\)\]`
.. py:property:: Page.has_next :module: fuggers_py.adapters :type: bool
Return whether another page is available.
.. py:class:: Pagination(limit=100, cursor=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.Pagination
Cursor-based pagination window.
:type limit: :sphinx_autodoc_typehints_type:\:py\:class\:\int` :param limit: Maximum number of records to return in one page. :type cursor: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param cursor: Zero-based offset encoded as text. None starts from the beginning.
.. py:method:: Pagination.offset() :module: fuggers_py.adapters
Interpret the cursor as a zero-based offset.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`int\``
.. py:exception:: PermissionDeniedError(message=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.errors.PermissionDeniedError
.. py:class:: PortfolioFilter(portfolio_ids=(), as_of=None, currency=None, source=None, instrument_id=None, name_contains=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.PortfolioFilter
Filter for stored portfolios by metadata and membership.
:type portfolio_ids: :sphinx_autodoc_typehints_type:\:py\:class\:\tuple`\ \[:py:class:`~fuggers_py.core.ids.PortfolioId`, :py:data:`…<Ellipsis>`] :param portfolio_ids: Optional portfolio identifiers to match. :type as_of: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.types.Date` | :py:obj:`None` :param as_of: Optional as-of date to match. :type currency: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.types.Currency` | :py:obj:`None` :param currency: Optional currency to match. :type source: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None` :param source: Optional provenance label to match. :type instrument_id: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.ids.InstrumentId` | :py:obj:`None` :param instrument_id: Optional instrument membership filter. :type name_contains: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param name_contains: Optional case-insensitive substring filter for the portfolio name.
.. py:method:: PortfolioFilter.matches(portfolio) :module: fuggers_py.adapters
Return whether a stored portfolio satisfies the filter.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`bool\``
.. py:class:: PortfolioStore(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.PortfolioStore
Protocol for stored portfolio retrieval and listing.
.. py:class:: PrettyJsonCodec() :module: fuggers_py.adapters :canonical: fuggers_py.adapters.json_codec.PrettyJsonCodec
Indented JSON codec for debugging and human-readable fixtures.
This variant uses a stable two-space indent so fixtures are easy to inspect and diff.
.. py:class:: PricingConfig(config_id, pricing_spec=
Stored pricing configuration keyed by config id.
:type config_id: :sphinx_autodoc_typehints_type:\:py\:class\:\str` :param config_id: Stable configuration identifier. :type pricing_spec: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.calc.pricing_specs.PricingSpec` :param pricing_spec: Pricing specification attached to the stored record. :type source: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None` :param source: Optional provenance label for the stored record. :type as_of: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.types.Date` | :py:obj:`None` :param as_of: Optional as-of date for the configuration. :type description: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param description: Optional human-readable description.
.. py:class:: RemoteStorageTransport(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.transport.RemoteStorageTransport
Protocol for remote key/value storage transport.
Keys are addressed by namespace and key string, and payloads are stored as raw bytes.
.. py:class:: SQLiteStorageAdapter(path=’:memory:’, *, codec=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.sqlite_storage.SQLiteStorageAdapter
Composite SQLite-backed storage adapter.
The adapter opens one SQLite connection and exposes the concrete bond, curve, config, override, and audit stores through a single facade.
.. py:method:: SQLiteStorageAdapter.close() :module: fuggers_py.adapters
Close the underlying SQLite connection.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:obj\:\`None\``
.. py:method:: SQLiteStorageAdapter.get_bond_reference(instrument_id) :module: fuggers_py.adapters
Delegate bond reference lookup to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.reference.reference\_data.BondReferenceData\` \| \:py\:obj\:\`None\``
.. py:method:: SQLiteStorageAdapter.list_bond_references(pagination=None) :module: fuggers_py.adapters
Delegate bond reference listing to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.reference.reference\_data.BondReferenceData\`\]`
.. py:method:: SQLiteStorageAdapter.get_curve_config(curve_id) :module: fuggers_py.adapters
Delegate curve config lookup to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.CurveConfig\` \| \:py\:obj\:\`None\``
.. py:method:: SQLiteStorageAdapter.get_curve_snapshot(curve_id, reference_date=None) :module: fuggers_py.adapters
Delegate curve snapshot lookup to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.CurveSnapshot\` \| \:py\:obj\:\`None\``
.. py:method:: SQLiteStorageAdapter.list_curve_snapshots(curve_id, pagination=None) :module: fuggers_py.adapters
Delegate curve snapshot listing to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.adapters.storage.CurveSnapshot\`\]`
.. py:method:: SQLiteStorageAdapter.get_pricing_config(config_id) :module: fuggers_py.adapters
Delegate pricing config lookup to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.PricingConfig\` \| \:py\:obj\:\`None\``
.. py:method:: SQLiteStorageAdapter.get_engine_config(engine_name) :module: fuggers_py.adapters
Delegate engine config lookup to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.calc.config.EngineConfig\` \| \:py\:obj\:\`None\``
.. py:method:: SQLiteStorageAdapter.list_overrides(scope_id, pagination=None) :module: fuggers_py.adapters
Delegate override listing to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.adapters.storage.OverrideRecord\`\]`
.. py:method:: SQLiteStorageAdapter.append_audit_entry(entry) :module: fuggers_py.adapters
Delegate audit entry insertion to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.AuditEntry\``
.. py:method:: SQLiteStorageAdapter.list_audit_entries(entity_id=None, pagination=None) :module: fuggers_py.adapters
Delegate audit entry listing to the SQLite store.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.adapters.storage.AuditEntry\`\]`
.. py:class:: StorageAdapter(bond_store=None, curve_store=None, config_store=None, override_store=None, audit_store=None, portfolio_store=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.StorageAdapter
Composite storage adapter over optional store implementations.
Each method delegates to the configured store when present and otherwise returns the empty or missing value that best matches the store contract.
.. py:method:: StorageAdapter.get_bond_reference(instrument_id) :module: fuggers_py.adapters
Return a bond reference from the configured store, or ``None``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.reference.reference\_data.BondReferenceData\` \| \:py\:obj\:\`None\``
.. py:method:: StorageAdapter.list_bond_references(pagination=None) :module: fuggers_py.adapters
List bond references or return an empty page when no store exists.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.reference.reference\_data.BondReferenceData\`\]`
.. py:method:: StorageAdapter.get_curve_config(curve_id) :module: fuggers_py.adapters
Return a curve config from the configured store, or ``None``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.CurveConfig\` \| \:py\:obj\:\`None\``
.. py:method:: StorageAdapter.get_curve_snapshot(curve_id, reference_date=None) :module: fuggers_py.adapters
Return a curve snapshot from the configured store, or ``None``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.CurveSnapshot\` \| \:py\:obj\:\`None\``
.. py:method:: StorageAdapter.list_curve_snapshots(curve_id, pagination=None) :module: fuggers_py.adapters
List curve snapshots or return an empty page when no store exists.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.adapters.storage.CurveSnapshot\`\]`
.. py:method:: StorageAdapter.get_pricing_config(config_id) :module: fuggers_py.adapters
Return a pricing config from the configured store, or ``None``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.PricingConfig\` \| \:py\:obj\:\`None\``
.. py:method:: StorageAdapter.get_engine_config(engine_name) :module: fuggers_py.adapters
Return an engine config from the configured store, or ``None``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.calc.config.EngineConfig\` \| \:py\:obj\:\`None\``
.. py:method:: StorageAdapter.list_overrides(scope_id, pagination=None) :module: fuggers_py.adapters
List overrides or return an empty page when no store exists.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.adapters.storage.OverrideRecord\`\]`
.. py:method:: StorageAdapter.append_audit_entry(entry) :module: fuggers_py.adapters
Append an audit entry or return the input entry when no store exists.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.AuditEntry\``
.. py:method:: StorageAdapter.list_audit_entries(entity_id=None, pagination=None) :module: fuggers_py.adapters
List audit entries or return an empty page when no store exists.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.adapters.storage.AuditEntry\`\]`
.. py:method:: StorageAdapter.get_portfolio(portfolio_id, as_of=None) :module: fuggers_py.adapters
Return a stored portfolio from the configured store, or ``None``.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.StoredPortfolio\` \| \:py\:obj\:\`None\``
.. py:method:: StorageAdapter.list_portfolios(portfolio_filter=None, pagination=None) :module: fuggers_py.adapters
List portfolios or return an empty page when no store exists.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`\~fuggers\_py.adapters.storage.Page\`\\ \\\[\:py\:class\:\`\~fuggers\_py.adapters.storage.StoredPortfolio\`\]`
.. py:class:: StoredPortfolio(portfolio_id, positions, as_of=None, currency=None, name=None, source=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.storage.StoredPortfolio
Stored portfolio with deterministic position ordering.
:type portfolio_id: :sphinx_autodoc_typehints_type:\:py\:class\:\~fuggers_py.core.ids.PortfolioId` :param portfolio_id: Normalized portfolio identifier. :type positions: :sphinx_autodoc_typehints_type::py:class:`tuple`\ \[:py:class:`~fuggers_py.adapters.storage.StoredPosition`, :py:data:`…<Ellipsis>`] :param positions: Stored positions in the portfolio. :type as_of: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.types.Date` | :py:obj:`None` :param as_of: Optional snapshot date for the portfolio. :type currency: :sphinx_autodoc_typehints_type::py:class:`~fuggers_py.core.types.Currency` | :py:obj:`None` :param currency: Optional portfolio currency. :type name: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None` :param name: Optional human-readable portfolio name. :type source: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None``
:param source: Optional provenance label for the stored record.
.. py:property:: StoredPortfolio.position_count :module: fuggers_py.adapters :type: int
Return the number of stored positions.
.. py:method:: StoredPortfolio.contains_instrument(instrument_id) :module: fuggers_py.adapters
Return whether the portfolio contains the requested instrument.
:rtype: :sphinx_autodoc_typehints_type:`\:py\:class\:\`bool\``
.. py:class:: StoredPosition(instrument_id, quantity=None, weight=None, label=None, metadata=
Stored portfolio position with quantity or weight semantics.
At least one of quantity or weight must be supplied. When present,
both are interpreted as raw decimals and must be non-negative.
:type instrument_id: :sphinx_autodoc_typehints_type:\:py\:class\:\~fuggers_py.core.ids.InstrumentId` :param instrument_id: Normalized instrument identifier. :type quantity: :sphinx_autodoc_typehints_type::py:class:`~decimal.Decimal` | :py:obj:`None` :param quantity: Optional position quantity in instrument units. :type weight: :sphinx_autodoc_typehints_type::py:class:`~decimal.Decimal` | :py:obj:`None` :param weight: Optional portfolio weight as a raw decimal fraction. :type label: :sphinx_autodoc_typehints_type::py:class:`str` | :py:obj:`None` :param label: Optional descriptive label for the position. :type metadata: :sphinx_autodoc_typehints_type::py:class:`dict`\ \[:py:class:`str`, :py:class:`str`]`
:param metadata: Free-form string metadata preserved with deterministic key ordering.
.. py:exception:: TraitError(message=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.errors.TraitError
Base exception for the research-facing adapter surface.
Subclasses provide a stable code value and a default human-readable
message so callers can distinguish transport, parsing, persistence, and
permission failures without inspecting implementation-specific details.
.. py:exception:: TraitIOError(message=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.errors.TraitIOError
.. py:exception:: TraitTimeoutError(message=None) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.errors.TraitTimeoutError
.. py:class:: Transport(*args, **kwargs) :module: fuggers_py.adapters :canonical: fuggers_py.adapters.transport.Transport
Protocol for synchronous byte-oriented request/response transports.
The transport may carry an optional codec for convenience, but send and
request always operate on raw payload bytes.
.. py:function:: create_empty_output() :module: fuggers_py.adapters
Build an output publisher composed of no-op channel publishers.
:rtype: :sphinx_autodoc_typehints_type:\:py\:class\:\~fuggers_py.calc.output.OutputPublisher``
.. py:function:: create_file_market_data(*, quotes_csv=None, curve_inputs_json=None, fixings_csv=None, etf_quotes_csv=None) :module: fuggers_py.adapters
Build a market-data provider from optional file-backed sources.
Missing file paths are left unconfigured, so callers can mix file-backed and in-memory sources without creating placeholder files.
:rtype: :sphinx_autodoc_typehints_type:\:py\:class\:\~fuggers_py.market.market_data.MarketDataProvider``
.. py:function:: create_file_reference_data(*, bonds_csv=None, issuers_csv=None, ratings_csv=None, etf_holdings_csv=None) :module: fuggers_py.adapters
Build a reference-data provider from optional file-backed sources.
Missing file paths are left unconfigured so the returned provider can be composed with other reference-data sources.
:rtype: :sphinx_autodoc_typehints_type:\:py\:class\:\~fuggers_py.reference.reference_data.ReferenceDataProvider``