Library to extract legal information from official resources
Project description
lawLib
Library to extract legal information from official resources.
Installation
<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>
Get started
Get data from Spanish Supreme Court:
from typing import List
from scrapper import DataScrapper
import configparser
config = configparser.ConfigParser()
config.read("config.ini")
case_ids:List = [str(i) for i in [*range(1,5)]]
url:str = 'SpanishSupremeCourt'
#Something like data/json_data.json
output_path:str = config['EXTRA']['OutputPath']
#Get some cases
returned_data = DataScrapper(url,case_ids).get_data()
print(returned_data)
#Save cases as JSON
DataScrapper(url,case_ids).save_data('json',output_path)
Project details
Release history Release notifications | RSS feed
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.4.2.tar.gz
(3.4 kB
view hashes)
Built Distribution
lawLib-0.4.2-py3-none-any.whl
(3.5 kB
view hashes)