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 4.0.0

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 4.0.0
File Size Uploaded
fipiran-4.0.0.tar.gz 9.8 kB Details

Built distribution (wheel)

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

Total release size:20.3 kB

Release files / fipiran-4.0.0.tar.gz

Download URL fipiran-4.0.0.tar.gz
Size 9.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e1ced2ab384e68bd469ac5d72c99e8e92525a82ab4ca2bd95e86f73a531357cf
BLAKE2b-256 checksum
How to use checksums
1bc61e600ee94fd68fbbb0d6c13bffafbe62eb2641801a8a8de2a04b8c3b68a4
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-4.0.0-py3-none-any.whl

Download URL fipiran-4.0.0-py3-none-any.whl
Size 10.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a94e2adef12e0acc6c4ec0243afec56069508e4669e4a1fd831866d3eee1d7b8
BLAKE2b-256 checksum
How to use checksums
b67748b40e745c1ea2695c32cd67f607f05ca9729d41dcbbe4f7f0b598447d14
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

This release

4.0.0 This release

2 release files

3.0.1

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