Skip to main content

fstlib - Python Library for Reading fst Files

Introduction

fstlib is a Python library designed to facilitate the reading of fst (Fast Serialization of Data Frames) files using Python. fst is specifically designed to unlock the potential of high speed solid state disks that can be found in most modern computers. Data frames stored in the fst format have full random access, both in column and rows. Click here to read more about the performances fst files compared to other tabular files.

Features

  • Read fst files in binary format
  • Save fst files in binary format

Installation

To start using fstlib to read and save FST (Fast Serialization of Data Frames) files in Python, follow these installation steps:

Prerequisites

Before installing fstlib, ensure that you have the following prerequisites:

  1. Python: Make sure Python is installed on your system. You can download Python from python.org if you haven't already.

  2. Install R langage in your computer from CRAN. If you don't have R in your laptop the installation will abort.

  3. pip: Ensure that you have pip, the Python package manager, installed and up-to-date. You can upgrade pip using the following command:

   pip install --upgrade pip
   pip install git+https://github.com/finance-resilience/fstlib

or

   pip install --upgrade pip
   pip install fstlib
  1. Aws credentials: Since this package is private, it is usage is condition to the fact that you follow finres rules for access_key document. So it will work only if you followed the rule we set in the organization.

Same, since the repository is private, pip may prompt you for your GitHub credentials. Please provide your GitHub username and a personal access token with appropriate repository access permissions when prompted.

Once the installation is complete, you can start using fstlib in your Python projects to work with FST files efficiently.

Usage

Here's a simple example of how to use fstlib to read and save FST files:

    from  fstlib import fstlib
    import os
    import pandas as pd
    import numpy as np

    #path_s3 = "projects/I4CE/402.MLEVA/SIM2/I4CE_SIM2_EVA_WING_GWL_15.fst"
    
    # create a pandas dataframe
    df2 = pd.DataFrame(np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]]),columns=['a', 'b', 'c'])

    ## save the fst file
    fstlib.write_fst(df2, "df2.fst")
    
    # read the fst file
    df = fstlib.readfst("df2.fst")
    
    df.shape

    os.remove("df2.fst")

Documentation

For more detailed information on how to use fstlib, please refer to the documentation (if available).

License

This project is licensed under the MIT License.

Contribution

Contributions of the team is welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request on the GitHub repository.

Metadata

Release files for fstlib 1.0.8

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

Source distribution (sdist)

Source distribution for fstlib 1.0.8
File Size Uploaded Provenance Actions
fstlib-1.0.8.tar.gz 5.4 kB Without provenance Details for fstlib-1.0.8.tar.gz

Built distribution (wheel)

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

Total release size: 11.4 kB

Release files / fstlib-1.0.8.tar.gz

Download URL fstlib-1.0.8.tar.gz
Size 5.4 kB
Tags Source
SHA-256 checksum
How to use checksums
b9c5e0ac7dd78bc58c0abec9da347487d025aa98a609c753a405ded133c7417f
BLAKE2b-256 checksum
How to use checksums
f4bb5ac2517f3409cc809306f8ce70f5efca6f90a3b095fdaaaafd2e1d4dbee1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / fstlib-1.0.8-py3-none-any.whl

Download URL fstlib-1.0.8-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a4c64f2d621223c14711e69f2f8c5d12322f885554de251f436b2ce53df3b084
BLAKE2b-256 checksum
How to use checksums
f368464cb3d45c41ae2e2e220a1687ae436b508ff2d617cd9871121af7ed3374
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for fstlib 1.0.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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