Skip to main content
https://travis-ci.org/regardscitoyens/lawfactory_utils.svg?branch=master

A few utilities for the-law-factory-parser project, shared by senapy and anpy.

  • A simple caching library:

from lawfactory_utils.urls import enable_requests_cache, download
enable_requests_cache()

.....

resp = download(url)
print(resp.text)

Warning: To be able to download from Légifrance, you must set up a LEGIFRANCE_PROXY env variable, which is a running instance of legifrance-proxy.

The cached responses are stored in the directory where this lib is installed. You can use lawfactory_where_is_my_cache to print the path.

  • URL cleaning for senat/AN/legifrance/conseil-constit

>>> from lawfactory_utils.urls import clean_url
>>> clean_url('https://www.legifrance.gouv.fr/eli/loi/2017/9/15/JUSC1715752L/jo/texte')
'https://www.legifrance.gouv.fr/jorf/id/JORFTEXT000035567936'
  • Parsing of National Assembly URLS

>>> from lawfactory_utils.urls import parse_national_assembly
>>> parse_national_assembly_url("http://www.assemblee-nationale.fr/dyn/15/dossiers/retablissement_confiance_action_publique")
(15, 'retablissement_confiance_action_publique')

Release files for lawfactory-utils 0.2.2

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

Source distribution (sdist)

Source distribution for lawfactory-utils 0.2.2
File Size Uploaded
lawfactory_utils-0.2.2.tar.gz 5.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lawfactory-utils 0.2.2
File Interpreter ABI Platform
lawfactory_utils-0.2.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size: 12.5 kB

Release files / lawfactory_utils-0.2.2.tar.gz

Download URL lawfactory_utils-0.2.2.tar.gz
Size 5.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c2dcd272ecd57efe87087aa511989e5fe4ff2c9ef106c2f82fea989d4e4e921d
BLAKE2b-256 checksum
How to use checksums
74564dd02094ab832b47ba599e0b26f7321792cbfc98f3a0a64066d77858a82e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Release files / lawfactory_utils-0.2.2-py2.py3-none-any.whl

Download URL lawfactory_utils-0.2.2-py2.py3-none-any.whl
Size 7.0 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
312b9ea2cf205584450a74b2cfccc5fb2fe86f65b5741b3b13c20a714c946834
BLAKE2b-256 checksum
How to use checksums
63fd78f719a37d0a1853ee4a38c26ed1883f386905e2cf2cf188809a29c26dd4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.20.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.9

Release history Release notifications | RSS feed

This release

0.2.2 This release

2 release files

0.2.1

2 release files

0.2

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.7

1 release file

0.1.6

1 release file

0.1.5

1 release file

0.1.4

1 release file

0.1.3

1 release file

0.1.1

1 release file

0.1.0

1 release file

0.0.12

1 release file

0.0.11

1 release file

0.0.9

1 release file

0.0.8

1 release file

0.0.7

1 release file

0.0.6

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

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