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.1.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.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dsl_functions-1.3.1.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.1.tar.gz
Algorithm Hash digest
SHA256 ae4cc1ef80a2544ed023116b405fd4f970dcabf65268af2819b54e2f63aa4eb5
MD5 4377be17d4c5795fe8f8ef3b7a454478
BLAKE2b-256 eaac463e40a2cd2837b016a2b1295618ca40dc314990afe4d2a543fd55e4816b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsl_functions-1.3.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2aeabbc8c1492a1e277c2acd88838e91e955d71531a25253accf1378b82fa38b
MD5 6ae4fde455150db0b2bd22ade251178e
BLAKE2b-256 b9754480e061644b2def0243be801588e07dbd9484f9b6d7bedf8e2de3fc207a

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