Skip to main content

Simple use Date and text parsing from pdf rtf and images (with use of call back function)

This is a simple package provided by Marvsai healthcare LTD. It can find any format regular dates in a str as python Datetime objects.

Easy to use method

def find_dates(file_contents: str):

  Find any dates in a large python string usually taken from a file or pdf

  Args:
      file_contents (str): The string in which to find any format of dates


  Returns:
      List[datetime.datetime]: A list of datetime objects the latest can be found using max()

Optimised replacement of multiple strings in a string

replace_multiple_strings(input_string, replacements_dict)

Replace multiple strings in the input string using a dictionary of replacement pairs.

Args:
    input_string (str): The string in which to replace the substrings.
    replacements_dict (dict): A dictionary of replacement pairs, where the keys are the
        substrings to be replaced and the values are the replacement strings.

Returns:
    str: The input string with all instances of the substrings replaced with their
        corresponding replacement strings.
"""

Easy to use extraction of text from PDF or RTF files:

def extract_rtf_pdf(name: str, get_ai_text:Callable=None)->str:

  Find text from pdf and rtf

  Args:
      name (str): The string in which to find any format of dates
      get_ai_text: call back function that can call google vision api or AWS or Azure equivalents for text extraction
      Called for images and image PDFs.

  Returns:
      List[datetime.datetime]: A list of datetime objects the latest can be found using max()
  """

Metadata

Release files for auto-find-date-pdf 0.2.22

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

Source distribution (sdist)

Source distribution for auto-find-date-pdf 0.2.22
File Size Uploaded
auto_find_date_pdf-0.2.22.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for auto-find-date-pdf 0.2.22
File Interpreter ABI Platform
auto_find_date_pdf-0.2.22-py3-none-any.whl Python 3 none any Details

Total release size: 10.9 kB

Release files / auto_find_date_pdf-0.2.22.tar.gz

Download URL auto_find_date_pdf-0.2.22.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
2e1b3915759eea4313d344ff76ac77b1ea817529d5ca09e112374721d682e536
BLAKE2b-256 checksum
How to use checksums
067cb8cd0473fa210b2dc15fd423292ec9f4b7fa1fe12f6a0dc82cf4cc9b0f40
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release files / auto_find_date_pdf-0.2.22-py3-none-any.whl

Download URL auto_find_date_pdf-0.2.22-py3-none-any.whl
Size 5.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9e0de9e4cc56582e475f715467f73723f5e00539c995392bc5f1869d325967a
BLAKE2b-256 checksum
How to use checksums
e4268b0da77e94bf38e511571e381d36f0a112169ec27ca84594280cd93d8b45
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.1

Release history Release notifications | RSS feed

This release

0.2.22 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.1.23

2 release files

0.1.22

2 release files

0.1.21

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1.0

1 release file

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