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

Release files for fipiran 3.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fipiran 3.0.1
File Size Uploaded
fipiran-3.0.1.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for fipiran 3.0.1
File Interpreter ABI Platform
fipiran-3.0.1-py3-none-any.whl Python 3 none any Details

Total release size:19.0 kB

Release files / fipiran-3.0.1.tar.gz

Download URL fipiran-3.0.1.tar.gz
Size 9.1 kB
Tags Source
SHA-256 checksum
How to use checksums
d95cc222ef2de5e3c1a1e03794d9dabe47843ff2bf1f12aac5af7a6dbcb3fd4e
BLAKE2b-256 checksum
How to use checksums
1bf7f4c6a86e4173d94c6c98c76f1704991be8d28e5bb91a5714dcab82ddf06a
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / fipiran-3.0.1-py3-none-any.whl

Download URL fipiran-3.0.1-py3-none-any.whl
Size 9.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eaac377219ac538faf651c4e6724bf22993b0cfd1dcbf622a1e973b70447c887
BLAKE2b-256 checksum
How to use checksums
ffda1df2038716150f60dbe945bebf398c69f7b56c4fd8037323603d6c615a4e
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release history Release notifications | RSS feed

4.0.0

2 release files

This release

3.0.1 This release

2 release files

3.0.0

2 release files

2.0.1

2 release files

2.0.0

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.23.1

2 release files

0.23.0

2 release files

0.22.3

2 release files

0.22.2

2 release files

0.22.1

2 release files

0.21.0

2 release files

0.17.0

2 release files

0.16.1

2 release files

0.16.0

2 release files

0.15.0

2 release files

0.12.0

2 release files

0.11.1

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.0

2 release 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