a library to retrieve data from fipiran.ir website
Project description
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:
fundssymbols
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fipiran-3.0.0.tar.gz.
File metadata
- Download URL: fipiran-3.0.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4b78f5fc190b0bfdf2289c7441cab5c69fe272d77638e4df722f458d4dd62dba
|
|
| MD5 |
a25eef1802bfacc56d4937ac7d658204
|
|
| BLAKE2b-256 |
d5498a55a9cc9dac1f346a9e1be07df3429ade55c43b839f32eaa4796ff29070
|
File details
Details for the file fipiran-3.0.0-py3-none-any.whl.
File metadata
- Download URL: fipiran-3.0.0-py3-none-any.whl
- Upload date:
- Size: 9.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9f10894d3ef2a00fd79eadb7947d3bf26c84bde6068938226867df883d478e47
|
|
| MD5 |
2707db0f5f8940d241e8f468182976ec
|
|
| BLAKE2b-256 |
ae4f040e84e8f14fc0234b48ac009a864e00ba6f4664f5ba012e99f3ed174344
|