LEI lookup and management tool for banking compliance
Project description
FindLEI — LEI Batch Compliance Checker
findlei.com · Checks Entity Status & Next Renewal Date for every LEI in your Excel file.
What it does
- Upload an
.xlsx,.ods, or.xlsclient spreadsheet. - The app auto-detects the LEI column (by header name or 20-char pattern).
- For every LEI it queries:
- GLEIF official API first (
api.gleif.org) — free, no key required. - lei-lookup.com as fallback if either field is missing.
- GLEIF official API first (
- Results are written back as two new columns (
Entity Status,Next Renewal Date) with colour-coding and a thirdSourcecolumn. - Download the enriched file with one click.
Anti-blocking strategy
- Token bucket rate limiter per host (GLEIF: 2 req/s, lei-lookup: 0.4 req/s).
- Exponential back-off on HTTP 429 / 503.
- Shared persistent HTTP connection pool (
httpx.AsyncClient+ keep-alive). - Rotating
User-Agentconsistent with a real browser.
Stack
| Layer | Technology |
|---|---|
| Backend | Python 3.12 + FastAPI (async) |
| Frontend | Vanilla HTML/CSS/JS (no build step) |
| Excel | openpyxl (write) + pandas fallback |
| HTTP | httpx async |
| Scraping | BeautifulSoup4 + lxml |
| Progress | Server-Sent Events |
Local development
# 1. Clone / download the project
cd findlei
# 2. Create virtual environment
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
# 3. Install dependencies
pip install -r requirements.txt
# 4. Run dev server
uvicorn main:app --reload --port 8000
# 5. Open http://localhost:8000
Docker deployment (recommended for findlei.com)
# Build & start
docker compose up -d --build
# View logs
docker compose logs -f
# Stop
docker compose down
The app will be available on port 8000.
Nginx reverse proxy (production)
Put this in /etc/nginx/sites-available/findlei:
server {
listen 80;
server_name findlei.com www.findlei.com;
return 301 https://$host$request_uri;
}
server {
listen 443 ssl http2;
server_name findlei.com www.findlei.com;
ssl_certificate /etc/letsencrypt/live/findlei.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/findlei.com/privkey.pem;
# Important for SSE (disable proxy buffering)
proxy_buffering off;
proxy_cache off;
location / {
proxy_pass http://127.0.0.1:8000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_read_timeout 300s; # long timeout for batch jobs
}
}
Then:
sudo certbot --nginx -d findlei.com -d www.findlei.com
sudo nginx -t && sudo systemctl reload nginx
Production notes
- Multi-worker: With
--workers 2(Dockerfile default), jobs are stored in-process memory.
For more than 2 workers, replace thejobsdict inmain.pywith Redis. - File size: Uploads capped at 50 MB. Adjust in
main.pyif needed. - GLEIF API: No authentication required. Rate limit is generous (~10 req/s per IP in practice; the app stays well under that).
- lei-lookup.com: If the site changes its HTML structure, update
_parse_lei_lookup_html()inlei_checker.py.
Project structure
findlei/
├── main.py FastAPI app + routes
├── lei_checker.py GLEIF API + lei-lookup scraper + batch processor
├── excel_handler.py Excel read/write (openpyxl)
├── rate_limiter.py Token bucket per host
├── requirements.txt
├── Dockerfile
├── docker-compose.yml
└── static/
└── index.html Full frontend (single file, no build step)
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
findlei-2.1.0.tar.gz
(7.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file findlei-2.1.0.tar.gz.
File metadata
- Download URL: findlei-2.1.0.tar.gz
- Upload date:
- Size: 7.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6e1899e7423016d68564bb80a94b831b3820cbb21c115cdbeeac490344623250
|
|
| MD5 |
9d826430933ffc26ef2b62ca958d7c2c
|
|
| BLAKE2b-256 |
0a10502e6fbaaaf76eb55ebd98c86fdb4045bd64e9c895a203456d3b2b2b954a
|
File details
Details for the file findlei-2.1.0-py3-none-any.whl.
File metadata
- Download URL: findlei-2.1.0-py3-none-any.whl
- Upload date:
- Size: 2.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d755605d5d6d0c43d108c32615c7dea4c01d775daa924a11108c71dfc9c36493
|
|
| MD5 |
b18d52d00218e42026ffe639cd337eb7
|
|
| BLAKE2b-256 |
c310b82d9bce9d27069688759e347677856f053df94bdf8bbdba037886a07ed1
|