statement-parser 0.0.3__tar.gz → 0.0.5__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.
Files changed (20) hide show
  1. {statement_parser-0.0.3/statement_parser.egg-info → statement_parser-0.0.5}/PKG-INFO +1 -1
  2. {statement_parser-0.0.3 → statement_parser-0.0.5}/pyproject.toml +1 -1
  3. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/Bank.py +2 -1
  4. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/__init__.py +1 -1
  5. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/banks/HdfcCredit.py +2 -3
  6. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/banks/HsbcCredit.py +2 -3
  7. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/banks/HsbcDebit.py +2 -3
  8. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/banks/IciciCredit.py +3 -4
  9. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/banks/IciciDebit.py +2 -3
  10. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/banks/KotakDebit.py +2 -3
  11. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/banks/Wallet.py +2 -3
  12. {statement_parser-0.0.3 → statement_parser-0.0.5/statement_parser.egg-info}/PKG-INFO +1 -1
  13. {statement_parser-0.0.3 → statement_parser-0.0.5}/LICENSE +0 -0
  14. {statement_parser-0.0.3 → statement_parser-0.0.5}/README.md +0 -0
  15. {statement_parser-0.0.3 → statement_parser-0.0.5}/setup.cfg +0 -0
  16. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser/Transaction.py +0 -0
  17. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser.egg-info/SOURCES.txt +0 -0
  18. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser.egg-info/dependency_links.txt +0 -0
  19. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser.egg-info/requires.txt +0 -0
  20. {statement_parser-0.0.3 → statement_parser-0.0.5}/statement_parser.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: statement_parser
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: Bank Statement Parser is a Python library designed to parse and normalize transaction data from various bank statement formats ( CSV, Excel, etc.) into a consistent and easy-to-use Pandas DataFrame. It supports multiple banks and file formats, making it a versatile tool for financial data analysis.
5
5
  Author-email: Khuzema Challawala <khuzema.ac@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "statement_parser"
7
- version = "0.0.3"
7
+ version = "0.0.5"
8
8
  authors = [
9
9
  { name="Khuzema Challawala", email="khuzema.ac@gmail.com" },
10
10
  ]
@@ -1,4 +1,5 @@
1
1
  from abc import ABC, abstractmethod
2
+ from statement_parser.Transaction import Transaction
2
3
  import pandas as pd
3
4
  from dateutil import parser
4
5
  import logging
@@ -6,7 +7,7 @@ import logging
6
7
 
7
8
  class Bank(ABC):
8
9
  @abstractmethod
9
- def getTransactions(self, filename: str) -> pd.DataFrame:
10
+ def getTransactions(self, filename: str) -> list[Transaction]:
10
11
  pass
11
12
 
12
13
  def getDataFrame(self, filename: str) -> pd.DataFrame:
@@ -13,7 +13,7 @@ __all__ = ['Bank',
13
13
  'IciciDebit',
14
14
  'IciciCredit',
15
15
  'KotakDebit',
16
- 'HdfcCredit',
16
+ 'HdfcCredit',
17
17
  'HsbcCredit',
18
18
  'HsbcDebit',
19
19
  'Wallet']
@@ -1,5 +1,4 @@
1
1
 
2
- from typing import List
3
2
  import pandas as pd
4
3
  import statement_parser.Bank as Bank
5
4
  from statement_parser.Transaction import Transaction
@@ -8,8 +7,8 @@ from statement_parser.Transaction import Transaction
8
7
  class HdfcCredit(Bank):
9
8
  __id_bank = "HDFC-CREDIT"
10
9
 
11
- def getTransactions(self, filename: str) -> List[Transaction]:
12
- transactions: List[Transaction] = []
10
+ def getTransactions(self, filename: str) -> list[Transaction]:
11
+ transactions: list[Transaction] = []
13
12
 
14
13
  df = self.getData(filename)
15
14
  self.validateDataframe(df)
@@ -1,5 +1,4 @@
1
1
 
2
- from typing import List
3
2
  import pandas as pd
4
3
  import statement_parser.Bank as Bank
5
4
  from statement_parser.Transaction import Transaction
@@ -8,8 +7,8 @@ from statement_parser.Transaction import Transaction
8
7
  class HsbcCredit(Bank):
9
8
  __id_bank = "HSBC-CREDIT"
10
9
 
11
- def getTransactions(self, filename: str) -> List[Transaction]:
12
- transactions: List[Transaction] = []
10
+ def getTransactions(self, filename: str) -> list[Transaction]:
11
+ transactions: list[Transaction] = []
13
12
 
14
13
  df = self.getData(filename)
15
14
  self.validateDataframe(df)
@@ -1,5 +1,4 @@
1
1
 
2
- from typing import List
3
2
  import pandas as pd
4
3
  import statement_parser.Bank as Bank
5
4
  from statement_parser.Transaction import Transaction
@@ -8,8 +7,8 @@ from statement_parser.Transaction import Transaction
8
7
  class HsbcDebit(Bank):
9
8
  __id_bank = "HSBC-DEBIT"
10
9
 
11
- def getTransactions(self, filename: str) -> List[Transaction]:
12
- transactions: List[Transaction] = []
10
+ def getTransactions(self, filename: str) -> list[Transaction]:
11
+ transactions: list[Transaction] = []
13
12
 
14
13
  df = self.getData(filename)
15
14
  self.validateDataframe(df)
@@ -1,5 +1,4 @@
1
1
 
2
- from typing import List
3
2
  import pandas as pd
4
3
  import statement_parser.Bank as Bank
5
4
  from statement_parser.Transaction import Transaction
@@ -8,8 +7,8 @@ from statement_parser.Transaction import Transaction
8
7
  class IciciCredit(Bank):
9
8
  __id_bank = "ICICI-CREDIT"
10
9
 
11
- def getTransactions(self, filename: str) -> List[Transaction]:
12
- transactions: List[Transaction] = []
10
+ def getTransactions(self, filename: str) -> list[Transaction]:
11
+ transactions: list[Transaction] = []
13
12
 
14
13
  df = self.getData(filename)
15
14
  self.validateDataframe(df)
@@ -43,7 +42,7 @@ class IciciCredit(Bank):
43
42
  skip_rows = self.get_transaction_start(filename, ["date", "sr.no"])
44
43
  df_full = self.load_bank_statement(filename, skip_rows=skip_rows)
45
44
  # filter out empty rows
46
- df_filtered = df_full[df_full.iloc[:, 2].notna()]
45
+ df_filtered = df_full[df_full.iloc[:, 3].notna()]
47
46
  df = df_filtered.copy()
48
47
  return df
49
48
 
@@ -1,4 +1,3 @@
1
- from typing import List
2
1
  import pandas as pd
3
2
  import statement_parser.Bank as Bank
4
3
  from statement_parser.Transaction import Transaction
@@ -7,8 +6,8 @@ from statement_parser.Transaction import Transaction
7
6
  class IciciDebit(Bank):
8
7
  __id_bank = "ICICI-DEBIT"
9
8
 
10
- def getTransactions(self, filename: str) -> List[Transaction]:
11
- transactions: List[Transaction] = []
9
+ def getTransactions(self, filename: str) -> list[Transaction]:
10
+ transactions: list[Transaction] = []
12
11
  df = self.getData(filename)
13
12
  self.validateDataframe(df)
14
13
 
@@ -1,4 +1,3 @@
1
- from typing import List
2
1
  import pandas as pd
3
2
  import statement_parser.Bank as Bank
4
3
  from statement_parser.Transaction import Transaction
@@ -7,8 +6,8 @@ from statement_parser.Transaction import Transaction
7
6
  class KotakDebit(Bank):
8
7
  __id_bank = "KOTAK-DEBIT"
9
8
 
10
- def getTransactions(self, filename: str) -> List[Transaction]:
11
- transactions: List[Transaction] = []
9
+ def getTransactions(self, filename: str) -> list[Transaction]:
10
+ transactions: list[Transaction] = []
12
11
  df = self.getData(filename)
13
12
  self.validateDataframe(df)
14
13
 
@@ -1,4 +1,3 @@
1
- from typing import List
2
1
  import pandas as pd
3
2
  import statement_parser.Bank as Bank
4
3
  from statement_parser.Transaction import Transaction
@@ -7,8 +6,8 @@ from statement_parser.Transaction import Transaction
7
6
  class Wallet(Bank):
8
7
  __id_bank = "WALLET"
9
8
 
10
- def getTransactions(self, filename: str) -> List[Transaction]:
11
- transactions: List[Transaction] = []
9
+ def getTransactions(self, filename: str) -> list[Transaction]:
10
+ transactions: list[Transaction] = []
12
11
  df = self.getData(filename)
13
12
  self.validateDataframe(df)
14
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: statement_parser
3
- Version: 0.0.3
3
+ Version: 0.0.5
4
4
  Summary: Bank Statement Parser is a Python library designed to parse and normalize transaction data from various bank statement formats ( CSV, Excel, etc.) into a consistent and easy-to-use Pandas DataFrame. It supports multiple banks and file formats, making it a versatile tool for financial data analysis.
5
5
  Author-email: Khuzema Challawala <khuzema.ac@gmail.com>
6
6
  Classifier: Programming Language :: Python :: 3