Skip to main content

A module that contains functions designed extract and organize legal data, especially in Brazilian courts.

This project has been archived.

The maintainers of this project have marked this project as archived. No new releases are expected.

Project description

DSL Functions

A Python module with utilities for extracting and organizing legal data, especially from Brazilian courts.

PyPI License

Installation

pip install dsl_functions

Main Features

  • Web scraping utilities with CAPTCHA handling
  • Text cleaning and normalization functions
  • Date and month conversion utilities
  • CSV and file handling functions
  • Selenium WebDriver integration

Usage Examples

Basic Web Scraping

from dsl_functions import get

html = get("https://example.com")
print(html)

Text Extraction

from dsl_functions import clext

text = "Some text [START]extract this[END] more text"
extracted = clext(text, "[START]", "[END]")
print(extracted)  # "extract this"

Date Conversion

from dsl_functions import date

formatted = date("31/12/2023")
print(formatted)  # "2023-12-31"

Month Conversion (PT-BR to MM)

from dsl_functions import ajustar_mes

month_num = ajustar_mes("JAN")
print(month_num)  # "01"

Full Function Documentation

Web Scraping

  • get(url): Fetch HTML with CAPTCHA handling
  • get_driver(): Configure Selenium WebDriver
  • get_json(url): Fetch JSON data

Text Processing

  • clean(text): Normalize and clean text
  • clext(text, start, end): Extract text between delimiters
  • ajustar_mes(month): Convert PT-BR month abbreviations to numbers

File Handling

  • adicionar(filename, data): Append data to file
  • carregar_arquivo(filename): Read file contents
  • csv_to_list(filename): Read CSV into list

License

MIT - See LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dsl_functions-1.3.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dsl_functions-1.3.0-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file dsl_functions-1.3.0.tar.gz.

File metadata

  • Download URL: dsl_functions-1.3.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for dsl_functions-1.3.0.tar.gz
Algorithm Hash digest
SHA256 a542218fdc61161b08818e2fd00174b91f287b1c732a49b7d549efe19f7a698f
MD5 ceff3b8ed33c2ae61048a1ef79853800
BLAKE2b-256 19b9e9f86282bc237fa526cd9f292920480ffc9757615b9e242f5c80b221c58a

See more details on using hashes here.

File details

Details for the file dsl_functions-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: dsl_functions-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.10

File hashes

Hashes for dsl_functions-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 51cbe5663bbad4a337b395fa98bf6df5f08dfa6e7a7edd6fab6ca1bdaacb8ba9
MD5 5cb7c6f80ba9bb8937b0ec3ed76e3cbc
BLAKE2b-256 76ae8ee469cfc3c4d293e18e6f36ca5bb2bf7e25672c3eb6537e600d273d399b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page