Backend Python Engineer · Lima, Perú · Open to Remote
Backend Python Engineer
Lima, Perú · [email protected]
I'm a Backend Python Engineer with 2+ years of professional experience across healthcare and enterprise systems — currently at Fiberlux, where I work on Odoo development and leading a full ERP migration from Odoo v13 to a Django-based microservices architecture.
My focus is on building scalable, maintainable architectures. I enjoy tackling performance bottlenecks head-on — profiling with cProfile, tuning queries with EXPLAIN ANALYZE, and applying design patterns (Singleton, Strategy, OCP) to turn monolithic code into modular, extensible systems.
At Clínica Santa Isabel, I built core healthcare systems including a Payroll module and an Electronic Health Records system using Django and FastAPI. I care deeply about test coverage, observability, and CI/CD practices that keep systems reliable in production.
Currently deepening expertise in microservices architecture and AWS fundamentals. Active contributor to python-docs-es, the official Spanish translation of Python documentation.
Languages: Spanish (Native) · English B2 (EFSet Certified) · Open to: Remote backend roles, Python infrastructure collaboration, mentorship.
ir.rule security framework — eliminated 100% of cross-team AccessError blocks, reducing access resolution from 2–4 hours to 0ms.ISIS_CSI — Payroll & HR System Reengineering
Hospital Management Web Ecosystem
Algorithms, data structures, software engineering, databases, computer networks, and mathematical modeling. Strong foundation for system design and performance analysis.
Comfortable in English-speaking teams, reading technical docs, participating in code reviews, and written/verbal communication in international environments.
Production-ready, reusable template for secure backend APIs. JWT authentication with refresh token rotation, role-based permissions (admin/staff/client), rate limiting, and fully containerized with Docker. Built as a foundation for SaaS products, mobile backends, or microservices.
Achieved 100% test coverage with 60+ tests including integration suites for auth flows, endpoint coverage, and permission scenarios. Factory Boy–based test data with advanced mocking patterns.
Async file processing (CSV/Excel) with Celery and Redis. Decouples requests from heavy jobs, with status dashboard for upload history and task tracking. Production-style retry patterns.
Medical data management backend handling ~1,000 new records/day. Secure JWT access control, structured data workflows, and Jinja2 UI layer.
Full automation of complex payroll: allowances, deductions, tax processing. Eliminated manual errors and dramatically improved HR processing efficiency.
Automated daily email delivery with multi-role accounts (free/premium), email confirmation, admin dashboard, retries, and cron scheduling. Deployed to production.
Deep-dive into professional testing: reusable fixtures, parametrized tests, mocking of HTTP/email services. Modern uv-based environment.
Odoo's standard security model restricts CRM and Sales document ownership to a single Salesperson field. At Fiberlux, multiple executives — Postventa, Fidelización, and others — needed to operate on the same customer account simultaneously.
The result: critical AccessError blocks on every cross-team operation, invoicing bottlenecks, and manual admin intervention required every 2–4 hours to restore access.
Designed a Linked Executives (EV) governance engine that extends Odoo's security framework via ir.rule inheritance and dynamic relational logic — without forking the core.
Personal Orders and Personal Order Lines base rules using dot-notation relational paths, enabling safe CRUD operations for secondary executives.create_level_ids that inspects the operating uid and routes approvals to the correct team category — bypassing the account owner's commercial hierarchy when the creator is an EV.unlink AccessError on order lines by bridging the relational domain: order_id.partner_id.linked_executive_ids.user_id — forcing an implicit JOIN through the contacts and EV tables at query time.AND logic and amplify blocking), overwrote Odoo's native sale.sale_order_personal_rule external ID — injecting EV logic directly into the ORM security core, ensuring forward-compatibility with future Odoo upgrades.| Dimension | Legacy (Standard Odoo) | EV Model (Implemented) |
|---|---|---|
| Ownership | Single salesperson | Owner + N linked executives |
| Access Control | Hard block via ir.rule |
Dynamic access via relational domain |
| Approval Routing | Linear → always to account owner's team | Branched → routes by creator's actual role |
| Visibility | Manual follower subscription | Automatic on EV assignment |
| Access Resolution | 2–4 hours (manual by admin) | 0 ms (fully automated) |
| Audit Trail | Salesperson only | Owner + executor logged independently |
Fiberlux's invoicing workflow ran entirely inside Odoo — generating a single electronic invoice took ~2 minutes, with no async support and brittle handling of complex cases: credit sales, detracciones, USD/PEN multi-currency, and SUNAT delivery retries.
During billing peaks, the process saturated Odoo workers and blocked the entire ERP, creating SLA risk and manual intervention overhead for the operations team.
Built a standalone Django-based invoicing engine that replaces Odoo's invoicing core with a high-throughput, async-first pipeline integrated with the Nubefact (SUNAT) API.
| Dimension | Legacy (Odoo) | Django Engine |
|---|---|---|
| Throughput | 1 invoice / ~2 min | 50 invoices / 35s (~170× faster) |
| Concurrency | Single synchronous thread | 10 parallel async workers |
| Failure Handling | Manual intervention required | Auto-retry with exponential backoff |
| Multi-currency | Limited / error-prone | Full USD/PEN + IGV coverage |
| ERP Impact | Saturated Odoo workers during peaks | Fully decoupled — zero ERP contention |
| Test Coverage | None | 100% (unit + integration) |
Fiberlux's custom Odoo module synced telephony data (call recordings, transcripts, quality reports) from Five9's SFTP server into the ERP. The original implementation was fully synchronous — during large data loads, it blocked Odoo's worker processes company-wide, freezing CRM and invoicing operations simultaneously.
Additional issues: data inconsistencies between Five9 and Odoo, growing storage costs from unmanaged file accumulation, and fragile SFTP connectivity with no retry logic.
Re-engineered the entire sync module with a multi-threaded async architecture — decoupling heavy I/O from Odoo's request cycle entirely.
Many2one foreign keys + PostgreSQL views reduced query cost on 40k+ record tables for high-performance reporting.days_to_sanitize parameter with batch processing — auto-purges stale files on schedule, achieving 30% storage reduction.| Dimension | Legacy (Sync) | Async Architecture |
|---|---|---|
| ERP Impact | Company-wide Odoo freeze during sync | Zero perceived latency — fully decoupled |
| Data Consistency | Inconsistencies between Five9 and Odoo | 100% record-level consistency guaranteed |
| Storage | Unbounded file accumulation | 30% reduction via auto-batch sanitization |
| Query Performance | Slow scans on 40k+ record tables | B-Tree indexed, view-optimized queries |
| SFTP Resilience | Hard failures on network issues | Auto-retry with hierarchical error handling |
| RAM Stability | Risk of OOM on 100k+ files | Flat memory footprint via batch-limit governor |
| Race Conditions | Possible data corruption under load | Eliminated via indexed thread-state flags |
Fiberlux operates a critical production ERP on Odoo v13 managing mass invoicing, CRM, telephony integration, and customer contracts — all with heavily customized modules built over years.
A hard v17 upgrade proved infeasible: custom modules rely on deprecated APIs, data volume is large, and any single downtime window would halt billing operations. A v17 migration was initially scoped but ultimately abandoned in favor of a full Django rewrite — giving full control over performance, testability, and architecture without Odoo ORM constraints.
Designed a phased extraction architecture — instead of a risky big-bang rewrite, critical business logic is progressively migrated to standalone Django services, reducing Odoo coupling with each iteration.
| Decision | Rationale |
|---|---|
| Django over Odoo v17 as target | Full control over performance, testability, and API design — eliminates ORM constraints and framework lock-in entirely |
| Flat-table intermediate layer | Enables incremental module migration without disrupting live operations — data continuity preserved throughout |
| Phased extraction vs. big-bang rewrite | Eliminates single-point downtime risk; each extracted service is independently deployable and testable |
| Testodoo validation environment | Enables mass UAT of production data before any change reaches live systems |
| 100% coverage policy from day one | Prevents regression debt accumulating as new Django services replace legacy Odoo modules |
Several critical Odoo and Django workflows exhibited unexplained latency under production load — invoicing generation, CRM report queries, and data sync operations were degrading progressively as data volume grew.
Without systematic profiling, bottleneck identification was guesswork: developers were optimizing the wrong paths while true hotspots remained undetected. The system had no baseline performance data and no methodology for continuous optimization.
Implemented a systematic profiling pipeline using cProfile + SnakeViz to identify true hotspots with data — eliminating guesswork from optimization decisions.
cProfile.Profile() context managers, capturing full call-stack timing data including cumulative and per-call execution times across all function invocations.select_related(), prefetch_related(), and bulk querysets — collapsing hundreds of queries into single optimized calls.EXPLAIN ANALYZE on the slowest queries to identify sequential scans on high-cardinality columns. Created B-Tree composite indexes on frequently filtered foreign keys and date ranges — turning multi-second scans into millisecond lookups.| Bottleneck Type | Root Cause | Resolution |
|---|---|---|
| N+1 ORM queries | Loop issuing 1 query per record on related models | select_related / prefetch_related — collapsed to single query |
| Sequential table scans | Missing indexes on FK + date filter columns | B-Tree composite indexes — ms-level lookups on 40k+ rows |
| Redundant serialization | Same objects serialized multiple times per request cycle | Cached serialized output + lazy evaluation |
| Nested loop logic | O(n²) Python loops on large datasets | Set-based lookups + bulk ORM operations — O(n) complexity |
| Heavy in-loop computation | Expensive calculations repeated inside iteration | Pre-computed outside loop, passed as lookup dict |
From ~2 min/invoice in Odoo to 50 invoices in 35s in Django — using async mode with 10 concurrent workers. (Fiberlux)
Reduced critical Odoo invoicing workflow from 60s to 8–15s via PostgreSQL indexing, profiling, and async worker queues. (Fiberlux)
Consolidated 6 fragmented external APIs into 2 major endpoints, drastically reducing integration complexity. (Fiberlux)
Automated file sanitization with configurable batch processing eliminated 30% of production storage on the Five9 SFTP sync module.
Open to remote backend roles, Python infrastructure collaboration, and mentorship opportunities.