fast-csv-loader 2.2.0__tar.gz → 2.2.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fast-csv-loader
3
- Version: 2.2.0
3
+ Version: 2.2.1
4
4
  Summary: A fast and memory efficient way to load large CSV files (Timeseries data) into Pandas
5
5
  Project-URL: Bug Tracker, https://github.com/BennyThadikaran/fast_csv_loader/issues
6
6
  Project-URL: Homepage, https://github.com/BennyThadikaran/fast_csv_loader
@@ -43,6 +43,11 @@ It also improves program execution time, when iterating or loading a large numbe
43
43
 
44
44
  **Supports Python >= 3.8**
45
45
 
46
+ > **Note (v2.2.0):** This release introduces `cached_csv_loader`, an optional drop-in caching layer for `csv_loader` that significantly improves performance for repeated file reads. Existing behavior remains unchanged. Users are encouraged to review the updated documentation for details on cache behavior, invalidation, and configuration options.
47
+ >
48
+ > This feature was contributed by GitHub user **sai2311-eng**.
49
+
50
+
46
51
  ## Install
47
52
 
48
53
  `pip install fast-csv-loader`
@@ -14,6 +14,11 @@ It also improves program execution time, when iterating or loading a large numbe
14
14
 
15
15
  **Supports Python >= 3.8**
16
16
 
17
+ > **Note (v2.2.0):** This release introduces `cached_csv_loader`, an optional drop-in caching layer for `csv_loader` that significantly improves performance for repeated file reads. Existing behavior remains unchanged. Users are encouraged to review the updated documentation for details on cache behavior, invalidation, and configuration options.
18
+ >
19
+ > This feature was contributed by GitHub user **sai2311-eng**.
20
+
21
+
17
22
  ## Install
18
23
 
19
24
  `pip install fast-csv-loader`
@@ -33,7 +33,8 @@ from __future__ import annotations
33
33
  import threading
34
34
  from datetime import datetime
35
35
  from pathlib import Path
36
- from typing import List, Optional
36
+ from typing import Optional
37
+ from collections.abc import Sequence
37
38
 
38
39
  import pandas as pd
39
40
 
@@ -62,7 +63,7 @@ def cached_csv_loader(
62
63
  period: int = 160,
63
64
  end_date: Optional[datetime] = None,
64
65
  date_format: Optional[str] = None,
65
- use_columns: Optional[List[str]] = None,
66
+ use_columns: Optional[Sequence[str]] = None,
66
67
  chunk_size: int = 1024 * 6,
67
68
  ) -> pd.DataFrame:
68
69
  """
@@ -98,9 +99,9 @@ def cached_csv_loader(
98
99
  CSV date column if automatic parsing fails.
99
100
  :type date_format: Optional[str]
100
101
 
101
- :param use_columns: List of column names to load from the CSV file.
102
- If None, all columns are loaded.
103
- :type use_columns: Optional[List[str]]
102
+ :param use_columns: Default None. A sequence (e.g., list or tuple) of column names to load
103
+ from the CSV file. If None, all columns are loaded.
104
+ :type use_columns: Optional[Sequence[str]]
104
105
 
105
106
  :param chunk_size: Size of chunks (in bytes) used when reading the CSV
106
107
  file. Default is 6144 bytes (6 KB).
@@ -2,8 +2,8 @@ import io
2
2
  import os
3
3
  from datetime import datetime
4
4
  from pathlib import Path
5
- from typing import Optional, List
6
-
5
+ from typing import Optional
6
+ from collections.abc import Sequence
7
7
  import pandas as pd
8
8
 
9
9
 
@@ -12,7 +12,7 @@ def csv_loader(
12
12
  period: int = 160,
13
13
  end_date: Optional[datetime] = None,
14
14
  date_format: Optional[str] = None,
15
- use_columns: Optional[List[str]] = None,
15
+ use_columns: Optional[Sequence[str]] = None,
16
16
  chunk_size: int = 1024 * 6,
17
17
  ) -> pd.DataFrame:
18
18
  """
@@ -35,8 +35,9 @@ def csv_loader(
35
35
  :param date_format: Custom date format in case pandas is unable to parse the date column.
36
36
  :type date_format: Optional[str]
37
37
 
38
- :param use_columns: Default None. List of column names to load from the CSV file. If None, all columns are loaded.
39
- :type use_columns: Optional[List[str]]
38
+ :param use_columns: Default None. A sequence (e.g., list or tuple) of column names to load
39
+ from the CSV file. If None, all columns are loaded.
40
+ :type use_columns: Optional[Sequence[str]]
40
41
 
41
42
  :param chunk_size: The size of data chunks loaded into memory.
42
43
  The default is 6144 bytes (6 KB).
@@ -4,7 +4,7 @@ requires = [ "hatchling" ]
4
4
 
5
5
  [project]
6
6
  name = "fast-csv-loader"
7
- version = "2.2.0"
7
+ version = "2.2.1"
8
8
  description = "A fast and memory efficient way to load large CSV files (Timeseries data) into Pandas"
9
9
  readme = "README.md"
10
10
  keywords = [ "csv-loader", "csv-reader", "memory-efficient", "pandas-dataframe", "python3" ]
@@ -33,5 +33,5 @@ urls."Bug Tracker" = "https://github.com/BennyThadikaran/fast_csv_loader/issues"
33
33
  urls.Homepage = "https://github.com/BennyThadikaran/fast_csv_loader"
34
34
 
35
35
  [tool.hatch]
36
- build.targets.sdist.exclude = [ "docs", "tests", ".github" ]
37
- build.targets.wheel.exclude = [ "docs", "tests", ".github" ]
36
+ build.targets.wheel.exclude = [ ".github", "docs", "tests" ]
37
+ build.targets.sdist.exclude = [ ".github", "docs", "tests" ]
@@ -0,0 +1,4 @@
1
+ pandas==2.0.3; python_version == "3.8"
2
+ pandas==2.2.2; python_version > "3.8" and python_version < "3.13"
3
+ pandas==2.2.3; python_version >= "3.13" and python_version < "3.14"
4
+ pandas==2.3.3; python_version >= "3.14"
@@ -1 +0,0 @@
1
- pandas >= 2, <3
File without changes