Skip to main content

fipiran

An async Python library to fetch data from https://www.fipiran.com/.

[!NOTE]
This package is incomplete and still in its initial development phase. The API may change without deprecation.

Installation

Requires Python 3.13+. Available on PyPI.

$ uv add fipiran

Usage

import asyncio
from fipiran.symbols import Symbol


async def main():
    symbol = await Symbol.from_name('فملی')
    company_info = await symbol.info()
    print(company_info.model_dump_json(indent=2))


asyncio.run(main())

There are two main modules:

  • funds
  • symbols

Most tabular data functions return a Polars LazyFrame for optimized, lazy query evaluations. Use an asyncio-aware REPL, like python -m asyncio, to run the code samples below.

Example 1: Historical Data via Polars LazyFrames

Because symbol.history() returns a Polars LazyFrame, you append .collect() to process or inspect the records eagerly:

>>> from fipiran.symbols import Symbol
>>> symbol = await Symbol.from_name('فملی')
>>> history_lf = await symbol.history(limit=1)
>>> history_lf.collect()
shape: (1, 16)
┌───────────────────┬─────────────────┬──────────────────────┬───┬────────────┬────────────┬────────────┬───────┐
 insCode            transactionDate  numberOfTransactions    priceFirst  priceYest  lastStatus  hEven 
 ---                ---              ---                      ---         ---         ---         ---   
 str                datetime[μs]     f64                      f64         f64         i64         i64   
╞═══════════════════╪═════════════════╪══════════════════════╪═══╪════════════╪════════════╪════════════╪═══════╡
 35425587644337450  2025-10-01       11586.0                 6530.0      6530.0      0          122949 
└───────────────────┴─────────────────┴──────────────────────┴───┴────────────┴────────────┴────────────┴───────┘

Example 2: Querying Fund Records

Getting a listing of mutual funds as a LazyFrame. You can run expressions or filters before calling .collect() to grab the final data frame:

>>> from fipiran.funds import funds
>>> lf = await funds()
>>> lf.select(["regNo", "name", "isCompleted"]).limit(5).collect()
shape: (5, 3)
┌───────┬──────────────────────────┬─────────────┐
 regNo  name                      isCompleted 
 ---    ---                       ---         
 str    str                       bool        
╞═══════╪══════════════════════════╪═════════════╡
 11726  جسورانه فیروزه            true        
 11603  جسورانه فناوری بازنشستگی  true        
 11780  گروه زعفران سحرخیز        true        
 11772  طلای سرخ نو ویرا          true        
 11480  جسورانه یکم آرمان آتی     true        
└───────┴──────────────────────────┴─────────────┘

There are many other functions and methods. Please explore the code-base for more info.

If you are interested in other information that is available on fipiran.com but this library has no API for, please open an issue for them on GitHub.

See also

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fipiran-4.0.0.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fipiran-4.0.0-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file fipiran-4.0.0.tar.gz.

File metadata

  • Download URL: fipiran-4.0.0.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fipiran-4.0.0.tar.gz
Algorithm Hash digest
SHA256 e1ced2ab384e68bd469ac5d72c99e8e92525a82ab4ca2bd95e86f73a531357cf
MD5 a611bb245a744eb23256059b747dffeb
BLAKE2b-256 1bc61e600ee94fd68fbbb0d6c13bffafbe62eb2641801a8a8de2a04b8c3b68a4

See more details on using hashes here.

File details

Details for the file fipiran-4.0.0-py3-none-any.whl.

File metadata

  • Download URL: fipiran-4.0.0-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.8 {"installer":{"name":"uv","version":"0.11.8","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for fipiran-4.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a94e2adef12e0acc6c4ec0243afec56069508e4669e4a1fd831866d3eee1d7b8
MD5 159d6f397d9bd4289f4795258e0dcdc1
BLAKE2b-256 b67748b40e745c1ea2695c32cd67f607f05ca9729d41dcbbe4f7f0b598447d14

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

4.0.0 This release

2 files

3.0.1

2 files

3.0.0

2 files

2.0.1

2 files

2.0.0

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

0.23.1

2 files

0.23.0

2 files

0.22.3

2 files

0.22.2

2 files

0.22.1

2 files

0.22.0

2 files

0.21.0

2 files

0.20.0

2 files

0.19.1

2 files

0.19.0

2 files

0.18.1

2 files

0.18.0

2 files

0.17.0

2 files

0.16.1

2 files

0.16.0

2 files

0.15.0

2 files

0.14.0

2 files

0.13.0

2 files

0.12.1

2 files

0.12.0

2 files

0.11.1

2 files

0.11.0

2 files

0.10.0

2 files

0.9.0

2 files

0.8.0

2 files

0.7.0

2 files

0.6.0

2 files

0.5.0

2 files

0.4.0

2 files

0.3.0

2 files

0.2.1

2 files

0.2.0

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page