Skip to main content

Library to extract legal information from official resources

Project description

lawLib

Library to extract legal information from official resources.

Get started

Get data from United States and Spanish Supreme Courts:

from typing import List

from scrapper import SupremeCourtUnitedStates, SupremeCourtSpain

import configparser



config = configparser.ConfigParser()

config.read("config.ini")



case_ids:List = [str(i) for i in [*range(1,5)]]

area:str='courts'

source_SpanishSupremeCourt:str = 'SpanishSupremeCourt'

source_USASupremeCourt:str = 'USASupremeCourt'



#Something like data/

output_path:str = config['EXTRA']['OutputPath']



#Get some cases and save them on local files

SupremeCourtSpain(source_SpanishSupremeCourt,case_ids).get_data(output_path,'json',True)



#Get some cases and return as list

print(SupremeCourtSpain(source_SpanishSupremeCourt,case_ids).get_data(output_path,'json',False))



#Get some cases and save them on local files

SupremeCourtUnitedStates(source_USASupremeCourt,area).get_data(output_path,'json',True)



#Get some cases and return as list

print(SupremeCourtUnitedStates(source_USASupremeCourt,area).get_data(output_path,'json',False))

Installation for development purposes


<h3>:construction: Working enviroment:</h3>

<li>Python version <b>3.9</b></li> 

<li>Virtual enviroment: <b>py -m venv env</b></li> 

<li>Activate on WINDOWS: <b>env\Scripts\activate</b></li>

<li>Activate on MAC: <b>source env/bin/activate</b></li>

<h3>:books: Dependencies</h3>

<li>Install with: <b>pip3 install -r requirements.txt</b></li>

<h3>:mag_right: Testing</h3>

<li>Launch tests with: <b>python -m unittest -v tests/data_scrapper_test.py</b></li>

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

lawLib-0.5.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

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

lawLib-0.5.1-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file lawLib-0.5.1.tar.gz.

File metadata

  • Download URL: lawLib-0.5.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for lawLib-0.5.1.tar.gz
Algorithm Hash digest
SHA256 88e816aded39582466b561d6fb1fa9ed9f68f78b4623edf5637692af1effacf8
MD5 9a250955dd60e4be053b988def4fe1cd
BLAKE2b-256 69e4bfe11376af7a70c1f48eec0eb958db07b414a8caa9fd1c1456028c1e9ab9

See more details on using hashes here.

File details

Details for the file lawLib-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: lawLib-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.12

File hashes

Hashes for lawLib-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a52b274d73aea71d18621f7d2d9979b595dae788db405f6d87f29aa9e9dd9d52
MD5 66a54ad37533b74a74d515061140118a
BLAKE2b-256 eeade6e90cf255ebaa880ac6c0b32dbaa02f5723bb34fb73e8ad468680b75c0a

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