Haldwani Times
Haldwani Times
Technology

lokal-id 0.18.3

lokal-id 0.18.3
Photo / Illustration: Haldwani Times Editorial Desk

Skip to main content Switch to mobile version lokal-id 0.18.3 Indonesian data primitives for apps and AI agents: NIK, NPWP, phone numbers, Rupiah, terbilang, holidays, Kemendagri regions with postal codes, and Samaran PII masking (UU PDP).

pip install lokal-id==0.18.3 Copy PIP instructions

Indonesian data primitives for Python backends and AI agents: NIK, NPWP, phone numbers, Rupiah, terbilang, holidays and working days, Kemendagri regions with postal codes, and Samaran, which masks Indonesian personal data before it reaches an LLM or a log, and restores it afterwards.

The Python port of @lokal-id/core: same rules, same data, same results, checked by replaying thousands of TypeScript outputs in the test suite. No dependencies, fully typed, Python 3.10+.

Part of Lokal · Bahasa Indonesia

pip install lokal-id import lokal # NIK, NPWP, phone, Rupiah, holidays, Samaran from lokal import wilayah # regions and postal codes (loaded on first use) Usage

from decimal import Decimal import datetime as dt from lokal import ( parse_nik, parse_npwp, parse_phone, format_rupiah, format_rupiah_short, parse_rupiah, terbilang, add_working_days, is_working_day, ) from lokal.wilayah import list_wilayah, search_wilayah, wilayah_name, find_by_postal_code, parse_alamat nik = parse_nik('3201011508950001', lookup_wilayah=wilayah_name) nik.valid, nik.regency, nik.district, nik.gender, nik.birth_date # (True, 'Kabupaten Bogor', 'Cibinong', 'L', '1995-08-15') phone = parse_phone('0812 3456 7890') phone.e164, phone.national, phone.whatsapp, phone.operator # ('+6281234567890', '0812-3456-7890', '6281234567890', 'Telkomsel') format_rupiah(1500000) # 'Rp1.500.000' format_rupiah(Decimal('1500000.505'), decimals=True) # 'Rp1.500.000,51', exact for database decimals format_rupiah_short(2300000000) # 'Rp2,3 M' terbilang(1500000, currency=True) # 'satu juta lima ratus ribu rupiah' parse_rupiah('2jtan') # ParsedRupiah(amount=2000000, approximate=True) parse_rupiah('sejuta setengah') # ParsedRupiah(amount=1500000, approximate=False) add_working_days('2026-03-17', 1) # '2026-03-25', skipping Nyepi and Lebaran add_working_days(dt.date(2026, 3, 17), 1) # datetime.date(2026, 3, 25): dates in, dates out is_working_day('2026-12-24', cuti_bersama=False) # True for offices that ignore cuti bersama len(list_wilayah('32.76')) # 11 kecamatan in Kota Depok search_wilayah('kab. bogor')[0].code # '32.01' find_by_postal_code('16431')[0].path # 'Depok, Pancoran Mas, Kota Depok, Jawa Barat' alamat = parse_alamat('jl margonda raya no 100 rt 3/5 kemiri muka beji depok 16423') alamat.kelurahan_desa.code, alamat.rt, alamat.confidence # ('32.76.06.1004', '003', 'high') Every result is a dataclass. to_dict() gives a JSON-ready dict without empty fields, and to_dict(camel=True) uses the same keys as the TypeScript package (birthDate, postalCode) for frontends that share types with it.

Samaran: mask before the LLM, restore after

from anthropic import Anthropic from lokal import Samaran client = Anthropic() def balas_pelanggan(pesan: str) -> str: samaran = Samaran() # one vault per conversation or request masked = samaran.mask(pesan).text # 'NIK saya [NIK_1], HP [PHONE_1]' reply = client.messages.create( model='claude-sonnet-5-5', max_tokens=1024, messages=[{'role': 'user', 'content': masked}], ) return samaran.unmask(reply.content[0].text) # real values back, on your server The same value always maps to the same placeholder, across formats: 0812-… and +62 812… are both [PHONE_1].

Samaran(mode='partial') is for logs and admin screens: 3201********0001, 0812****7890, b***@gmail.com.

Samaran(exclude=['FINANCIAL', 'NAME']) keeps types your app has to read, such as income and installments in a dealer's credit simulation, while NIK, phone numbers, and accounts are still masked. types= does the opposite (only those). An unknown type name raises ValueError.

Samaran(allow=['cs@toko.id', re.compile(r'@toko\.id

Haldwani Times
Haldwani Times Independent News & Editorial
Login
MARKETS & FINANCE
BRENT CRUDE: $78.40 -0.52% SENSEX: 81,450.20 +0.42% NIFTY 50: 24,820.15 +0.38% GOLD (24K): ₹74,500/10g -0.18% USD/INR: ₹95.54 +0.10%

ADMINISTRATIVE LEADERSHIP

Top Headlines & Breaking Stories

View All News →

Haldwani Times – Everything in Haldwani: News, Shops, Businesses & Services

Haldwani Times is the premier digital news and commercial discovery platform built specifically for the citizens, business owners, students, professionals, and visitors of Haldwani, Nainital district, and the wider Kumaon region of Devbhoomi Uttarakhand. As the economic gateway to the Kumaon Himalayas, Haldwani is a bustling metropolis connecting the plains of northern India with the scenic mountain districts of Nainital, Almora, Pithoragarh, Bageshwar, Champawat, and Udham Singh Nagar. Haldwani Times serves as the definitive digital heartbeat of the city, bringing breaking hyperlocal news, verified commercial directories, educational updates, healthcare guides, Mandi Bhav rates, and civic announcements onto a single unified, trusted platform.

The Definitive Source for Breaking Haldwani News & Civic Updates

Haldwani stands as one of the fastest-growing urban conglomerates and commercial engines in northern India. Positioned in the fertile Terai-Bhabhar belt at the foothills of the Shivalik range, the twin cities of Haldwani and Kathgodam form the administrative and logistical nerve center for the entire Kumaon division. With rapid urbanization, expanding commercial infrastructure, flourishing educational centers, and increasing inter-state transit, the demand for fast, fact-checked, and unbiased local journalism has never been greater. Haldwani Times delivers 24/7 comprehensive news coverage built on rigorous journalistic standards: - **Hyperlocal Civic News:** Real-time coverage of municipal corporation affairs, city drainage projects, traffic management blueprints, and road widening drives across Tikonia, Mukhani, Kusumkhera, Bareilly Road, and Rampur Road. - **Administrative Directives:** Official notifications from the District Magistrate (DM) Nainital, Senior Superintendent of Police (SSP), and state secretariat decisions affecting citizen welfare. - **Kumaon Weather & Disaster Alerts:** Timely mountain rainfall warnings, landslide advisories along NH-109 (Haldwani-Nainital Highway), and emergency bulletins during the monsoon and winter seasons. - **Education & Campus News:** Timely reports on Kumaon University examination schedules, Uttarakhand Board (UBSE) results, medical college admissions, and competitive coaching updates. - **Commercial & Market Trends:** Daily wholesale Mandi Bhav rates from Haldwani Subzi Mandi, real estate trends, retail market festivals, and local business openings. - **Cultural & Pahadi Heritage:** In-depth feature stories celebrating Kumaoni folk traditions, Aipan art, Nanda Devi festivals, and local community milestones.

Everything in Haldwani on One Unified Digital Ecosystem

Beyond traditional news reporting, Haldwani Times is engineered as an exhaustive local discovery engine. Historically, finding verified local business telephone numbers, emergency hospital contacts, specialized doctors, reliable plumbers, or trusted real estate consultants in Haldwani required asking neighbors or browsing outdated social media posts. Haldwani Times eliminates this friction by organizing every commercial, professional, and civic resource into searchable, verified categories. Whether you are a newly arrived resident in Kusumkhera looking for high-speed broadband providers, a parent searching for reputable CBSE schools near Kaladhungi Road, or a tourist seeking taxi rentals to Nainital, our portal delivers accurate, verified, and actionable information in seconds.

Local Shops, Retail Hubs & Traditional Bazaars in Haldwani

The retail commerce of Haldwani spans centuries-old traditional bazaars and modern commercial complexes: - **Bada Bazaar & Mangal Parao:** The historic retail heart of Haldwani, renowned for traditional Kumaoni wedding jewelry (Pauji, Guloband, Nath), brass utensils, ethnic handlooms, and wholesale clothing. - **Nainital Road & Tikonia Commercial Corridor:** Modern multi-brand retail showrooms, electronics stores, authorized smartphone service centers, branded footwear outlets, and international apparel stores. - **Bareilly Road & Rampur Road Trade Hubs:** Major agricultural machinery dealers, hardware and building material wholesalers, furniture manufacturing units, plywood distributors, and automobile showrooms. - **Subzi Mandi & Wholesale Grain Market:** One of the largest agricultural distribution centers in North India, supplying fresh vegetables, hill fruits (apples, peaches, plums), and organic Pahadi pulses (Gahat, Bhatt, Rajma) across northern states.

Healthcare Hub of Kumaon: Hospitals & Emergency Services

Haldwani serves as the premier medical lifeline for all six hill districts of Kumaon. Patients travel from Almora, Pithoragarh, Bageshwar, and Champawat to access specialized clinical treatments in Haldwani: - **Government Healthcare Institutions:** Dr. Susheela Tiwari Government Medical College & Hospital (STGH) and Base Hospital Haldwani provide tertiary trauma care, specialized super-specialties, pediatric ICUs, and 24/7 emergency response. - **Private Multi-Specialty Hospitals:** Advanced private medical centers specializing in cardiology, joint replacements, neurology, critical care, nephrology, and advanced laparoscopic surgeries. - **Diagnostic Centers & 24/7 Pharmacies:** Fully automated pathology laboratories, high-resolution MRI/CT scan centers, and round-the-clock emergency pharmacies clustered around Medical College Road, Kaladhungi Road, and Rampur Road.

Education, Colleges, Coaching Academies & Youth Development

Haldwani is the educational capital of the Kumaon region, home to thousands of ambitious students preparing for medical, engineering, defense, and civil services careers: - **Premier Degree Colleges:** Motiram Baburam Government Post Graduate College (MBPG College) and Women's Degree College providing extensive undergraduate and postgraduate humanities, commerce, and science programs. - **Competitive Coaching Ecosystem:** Highly reputed coaching academies for NEET UG, JEE Main & Advanced, UPSC Civil Services, UKPSC/UKSSSC, NDA, CDS, and Banking examinations along Kaladhungi Road and Tikonia. - **Affiliated Schooling Infrastructure:** Esteemed CBSE, ICSE, and Uttarakhand Board schools imparting value-based holistic education with modern sports and laboratory facilities.

Real Estate, Housing Colonies & Urban Expansion Trends

Driven by rapid infrastructure expansion and high quality of life, Haldwani's real estate market is expanding outward into organized residential colonies: - **Prime Residential Localities:** Highly sought-after residential sectors in Mukhani, Kusumkhera, Kaladhungi Road, Judge Farm, Daharia, and Bhotia Parao offering planned housing, green parks, and modern civic amenities. - **Commercial Property Investments:** Thriving commercial retail complexes, office spaces, and warehouse hubs developing rapidly along the proposed Haldwani Ring Road and transport corridors. - **Property Advisory & RERA Compliance:** In-depth real estate updates, circle rate revisions by the Nainital district administration, and buyer advisory guidelines for safe property acquisitions.

Strategic Transit Gateway, Tourism Routes & Kumaon Himalayan Connectivity

Haldwani-Kathgodam is the vital transit bridge connecting the plains of Delhi NCR and Uttar Pradesh with the hill stations of Uttarakhand: - **Kathgodam Railway Terminal:** Connecting Kumaon directly to New Delhi (Shatabdi Express, Ranikhet Express), Lucknow, Kolkata, Jammu, and Dehradun. - **ISBT Haldwani:** Operating round-the-clock interstate and mountain bus routes managed by Uttarakhand Transport Corporation (UTC) and private deluxe coaches. - **Pantnagar Airport (PGH):** Located just 26 km from Haldwani, offering scheduled domestic flights to New Delhi, Dehradun, Pithoragarh, and regional hubs. - **Himalayan Tourism Hub:** The primary staging point for journeys to Nainital (34 km), Bhimtal (30 km), Mukteshwar (72 km), Kainchi Dham (42 km), Almora (90 km), Ranikhet (80 km), and Jim Corbett National Park (55 km).

Gaula River Mining, Ecological Balance & The Bhabhar Economy

The Gaula River represents the undisputed economic and hydrological lifeline of Haldwani and the broader Nainital district. Originating from the Sattal-Bhimtal catchment in the lesser Himalayas, the river flows south past Kathgodam and Haldwani before merging into the Ramganga. For generations, the Gaula riverbed has provided the foundation for both regional agriculture and the construction economy across northern India: - **Regulated Minor Mineral Extraction:** During the open mining season (typically October to May), thousands of registered tractor-trolleys and heavy dumpers harvest riverbed gravel, sand, and boulders under strict surveillance by the Uttarakhand Forest Development Corporation and the Nainital district administration. - **Livelihood Support for Over 50,000 Families:** The Gaula mining economy directly and indirectly sustains vehicle owners, drivers, mechanics, diesel pump stations, roadside eateries, and local laborers, circulating over ₹500 crore into Haldwani's local markets annually. - **Environmental Safeguards & Flood Mitigation:** In strict adherence to High Court and National Green Tribunal (NGT) directives, scientific replenishment studies, satellite GPS tracking on transport vehicles, and seasonal mining bans during the monsoon protect the river's ecological balance and prevent bank erosion along low-lying residential sectors.

Culinary Landscape: From Traditional Kumaoni Rasoi to Modern Cafes

Haldwani's gastronomic scene reflects a delightful blend of rustic mountain traditions and cosmopolitan dining: - **Authentic Kumaoni Specialties:** Local restaurants and heritage dhabas serve traditional mountain delicacies cooked in iron vessels, including Bhatt ki Churkani (black soybean curry), Gahat ke Dubke (horsegram puree), Aloo ke Gutke tempered with wild Himalayan chives (Jamboo) and Jakhiya, and refreshing cucumber Raita flavored with freshly crushed mustard seeds. - **Traditional Confectioneries:** Historic sweet shops along Bada Bazaar and Nainital Road craft Almora's world-famous Bal Mithai (roasted caramelized khoya fudge coated in sugar balls) and Singaudi (sweetened khoya wrapped in wild Malu leaves). - **Vibrant Street Food & Cafe Culture:** As dusk falls, Tikonia and Nainital Road come alive with bustling street food stalls offering steaming Tibetan momos, spiced thukpa, Kathi rolls, and hot Masala Chai, alongside modern rooftop cafes serving specialty Italian coffees and continental snacks.

Cultural Festivals, Folk Heritage & The Aipan Art of Kumaon

Beyond commercial enterprise, Haldwani is the proud cultural showcase of Devbhoomi Uttarakhand: - **Aipan Folk Art Tradition:** The sacred geometrical floor and wall art handcrafted with red ochre (Geru) and white rice paste (Biswar) adorning thresholds, altars, and chowkis during auspicious ceremonies, now preserved through local women's self-help cooperatives. - **Classical Baithki & Khadi Holi:** Unique to Kumaon, musical celebrations starting as early as the month of Paush, featuring classical Hindustani ragas sung in community courtyards followed by energetic Chholiya dance performances during spring. - **Nanda Devi & Chholiya Heritage:** Grand annual fairs celebrating the patron deity Nanda Devi, accompanied by martial sword-and-shield Chholiya dancers whose rhythmic brass trumpets (Ransingha) and hurka drums resonate through the valley.

Public Amenities, Parks & Community Spaces in Haldwani

Urban lifestyle and recreational infrastructure in the city: - **Green Parks & Walking Tracks:** Walkway projects around Daharia, Judge Farm, and Awas Vikas providing lush recreational zones for families and seniors. - **Community Centers & Sports Grounds:** Multi-purpose auditoriums and grounds hosting cultural melas, badminton tournaments, and community celebrations. - **Gaula Barrage & Forest Trails:** Scenic river viewpoints and natural birdwatching areas attracting eco-tourists and local nature enthusiasts on weekends.

Frequently Asked Questions (FAQs)

How can I access live breaking news and weather alerts for Haldwani?

Haldwani Times operates a dedicated 24/7 hyperlocal newsroom providing real-time breaking bulletins, traffic alerts, and meteorological warnings. You can access live news directly from our homepage, subscribe to instant browser push notifications, or view categorical updates on Uttarakhand, Education, and Mandi Bhav. During monsoon and winter weather events, our correspondents provide live updates on NH-109 road blockages and emergency administrative orders issued by the Nainital District Magistrate.

Is Haldwani Times completely free to read for all visitors?

Yes, Haldwani Times offers completely unrestricted, open-access reading to all users without mandatory paywalls. Readers across Haldwani, Uttarakhand, and the global diaspora can freely browse all breaking news reports, investigative articles, business directory listings, and historical archives. Our public-interest mission ensures that essential civic information, emergency hospital directories, and educational circulars remain universally accessible to everyone at zero cost.

How can local business owners list their shop or service in the Haldwani directory?

Local merchants, medical practitioners, schools, and service professionals can register their business by navigating to our 'Business Directory' page and selecting 'Add Listing'. The registration process allows you to input your business name, address, contact numbers, operational hours, services offered, and high-resolution showroom photographs. Once submitted, our local verification team verifies the physical address within 24 hours to ensure high consumer trust and top ranking on Google.

Can I read Haldwani Times articles in Hindi as well as English?

Yes, Haldwani Times features a seamless, native bilingual reading experience tailored for our regional readership. With our one-click language toggle located prominently in the navigation bar, you can instantly switch between English and pure Hindi. Both versions feature carefully crafted editorial phrasing, accurate regional terminology, and culturally resonant storytelling to ensure maximum readability for students, families, and senior citizens alike.

How do I submit news tips, event notices, or press releases to the editorial team?

Our newsroom warmly welcomes verified news tips, community event notices, civic grievances, and official press releases from citizens and local organizations. You can submit your documents, photos, or video evidence directly to our central editorial desk at editorial@haldwanitimes.com or via our Help & Support page. Our senior editors review every submission for factual authenticity, multi-source verification, and public relevance prior to publication.

Where can visitors find authentic Kumaoni Bal Mithai and Singaudi in Haldwani?

Renowned traditional sweet houses clustered along Bada Bazaar, Mangal Parao, Kathgodam Station Road, and Nainital Road specialize in daily batches of authentic Bal Mithai and fragrant Singaudi prepared with pure mountain dairy khoya and natural ingredients.

What transportation options are available for traveling from Haldwani to Nainital and Bhimtal?

Continuous state transport buses (UTC), KMOU coaches, and registered taxi union sharing cabs operate 24/7 from the Haldwani Roadways Bus Station (near Tikonia) and Kathgodam Railway Station. Fares are regulated by the transport department, with mountain travel times ranging between 1 to 1.5 hours.

)]) never masks your own contacts.

placeholder('ADDRESS', street) gives the placeholder for a value you already know is personal, such as the street a parser split out of a masked address; unmask restores it.

export_vault() / import_vault() move the vault between processes, for example through Redis. Treat it as the raw data it contains.

detect_pii(text) returns the matches without masking; min_confidence='high' keeps only validated or keyword-anchored ones.

27 types, covering every category in UU PDP Article 4: identifiers (NIK, KK, NPWP, passport, SIM, NIP, BPJS, NISN, civil registry deed numbers, phone, email, bank account, card, plate, IP, coordinates), name, address, birth date, gender, religion, marital status, nationality, health, finances, criminal records, and biometrics. Found through labels, CSV headers, JSON/YAML keys, SQL INSERT dumps, WhatsApp chat exports, and common phrases in free text.

To cover every LLM call of an app without calling mask() and unmask() at each one, run the Samaran Proxy (npx @lokal-id/mcp proxy) next to the backend and point the SDK at it: OpenAI(base_url='http://127.0.0.1:8787/v1') or Anthropic(base_url='http://127.0.0.1:8787'). It masks requests and restores responses, streaming and tool calls included. See the Lokal README.

Names the rules do not know: an optional NER model

Samaran finds a name from its label, its column, a cue ("Pelanggan …", "a.n. …", "pak …"), or a known Indonesian given or family name. A name with none of these slips through, and in chat that is most names: "saya di chat sama rianto surya tadi pagi", "ada yang ngeliat minan minanto ga ya". For batch jobs where that matters, add a local NER model:

pip install "lokal-id[ner-lokal]" # Lokal's own model: onnxruntime only pip install "lokal-id[ner]" # all three models, with transformers and PyTorch: large Both need Python 3.11 or later, as onnxruntime and PyTorch do; the rest of the library runs on 3.10.

from lokal.samaran import Samaran from lokal.samaran.ner import NerNames ner = NerNames() # Lokal's model: downloaded once (125 MB) and checked against its SHA-256 samaran = Samaran(ner=ner) samaran.mask('td pagi rianto surya nelpon, katanya mau resign').text # 'td pagi [NAME_1] nelpon, katanya mau resign' There are three models, all IndoBERT fine-tuned for Indonesian NER and MIT-licensed. 'lokal' is Lokal's own (see its model card), downloaded from the GitHub release ner-base-v1 and checked against its SHA-256, into the folder @lokal-id/ner uses too. The other two are their authors' models, read from safetensors at a pinned revision, never from a pickle file:

Use 'lokal' for chat, tickets, and records; 'gold' when the text is mostly news. NerNames(model_path=...) loads an approved copy from a folder: one with model.onnx is read as Lokal's model. download_model() fetches Lokal's model ahead of time, for a container image or a machine that will be offline.

Settings. Thresholds and filters were chosen on development data only. Every number above is on data that played no part in choosing them.

Filters. Only the model's person names are used, and only those that pass filters for chat words and slang, informal verbs ("nungguin", "dibeliin"), field names, abbreviations, and place names. The model reads lower case, so a name in lower-case chat counts, but only in a sentence: not in a CSV header, a key=value, or an e-mail address.

Real news. In 2,277 articles from 14 Indonesian news sites, published in October 2026, the 2,250 speakers named after "kata", "ujar", or "sebut" were found 18.5% of the time by the rules and 90.6% with the fast model. That ranges from 83.7% (technology) to 97.2% (entertainment). The speakers were labelled automatically, and in a sample of the ones missed, more than half were job titles or organizations rather than people, so 90.6% is a lower bound. In a random sample of 300 of the fast model's detections there, 285 (95%) were people. The news texts were processed on one machine for the test, and only these numbers were kept.

Privacy. The model runs on your machine, and the text never leaves it. The only network access is downloading the model, once.

Merging. The model's matches merge with the rules' matches, and the rules win where they overlap. A name the model cut inside a word is masked whole, and a rank or form of address in front of it ("Kombes Pol.", "mama") is left out.

Long text. The model reads each line, and a long line in passages of about 600 characters cut at sentence ends. In one long passage it starts to miss names it finds when they stand alone.

Where to use it. Exports, batch masking, and data for vendors, not per keystroke. In Node, the same 'lokal' model is @lokal-id/ner, which the MCP server and the proxy use with "ner": true in .samaran.json. The guard does not use a model.

import logging from lokal.samaran.logging import SamaranFilter handler = logging.StreamHandler() handler.addFilter(SamaranFilter()) # partial masks by default logging.basicConfig(handlers=[handler], level=logging.INFO) logging.info('refund ke rek BCA %s, HP %s', '1234567890', '0812-3456-7890') # INFO:root:refund ke rek BCA ******7890, HP 0812****7890 The filter masks the formatted message, tracebacks, stack info, and fields passed with extra= (logging.info('order', extra={'customer_nik': nik})), so a JSON formatter that writes them out gets them masked too. Attach it to handlers, not loggers, so records from every logger pass through it.

Files: uploads, exports, and documents

lokal.files reads the same formats as the MCP server: text, CSV, JSON, logs, SQL, .xlsx, .docx, and text-based PDF, including filled-in PDF form fields. Scan an upload folder from a Django or FastAPI backend, or turn a document into text to mask before it goes to an LLM:

from lokal import Samaran from lokal.files import load_document, scan_path # Uploads: no .samaranignore or .samaran.json from the folder itself, since anyone uploading could put one there. report = scan_path('var/media', exclude=['FINANCIAL'], ignore_file=False, config=False) report.totals # {'NIK': 12, 'NAME': 9, 'PHONE': 7, ...} report.findings[0] # Finding(file='kredit/formulir.pdf', part='Halaman 1', line=4, type='NIK', # confidence='high', uu_pdp='umum', preview='3201********0001') [(n.file, n.reason) for n in report.not_scanned] # [('ktp/budi.jpg', 'image (may be a KTP or selfie photo)'), # ('kredit/lampiran.pdf', 'partly scanned: page 2 of 3 has no text layer (scanned) and needs OCR')] doc = load_document('var/media/kredit/formulir.pdf') s = Samaran() masked = [(part.name, s.mask(part.text).text) for part in doc.parts] # one part per page, sheet, or table Findings never contain the values, only partial masks, so a report can be logged or shown in an admin page.

Files that may hold personal data but cannot be read (photos, scanned or encrypted PDFs, .xls, archives) are listed in not_scanned, never treated as clean. report.clean is true only when nothing was found and nothing was left unread.

Folders skip node_modules, .git, virtualenvs, and build output, and honor .samaranignore and the allow list in .samaran.json at the folder root, for fixtures that hold only fake data. Pass ignore_file=False, config=False for a folder other people can write to (uploads, a repository you did not write).

Pure Python, like the rest of the package. A PDF of 1,000 pages takes about 6 seconds; most documents take milliseconds.

Kembaran: production data for staging

from pathlib import Path from lokal.kembaran import Kembaran k = Kembaran(secret='staging-2026') # the same secret gives the same people on every run for name in ('pelanggan.sql', 'kredit.csv'): # one instance: the same customer in both files out = k.text(Path('dump', name).read_text()) Path('staging', name).write_text(out.text) print(name, out.replaced) # {'NAME': 1200, 'NIK': 1200, 'PHONE': 1180, ...} Every person becomes a realistic stand-in: a valid NIK in the same district with the same gender and birth year, a phone number on the same operator, a name with the same casing, an address in the same area, e-mail at example.com. From the shell: python -m lokal.kembaran prod.sql -o staging.sql --secret …. The output is identical to the TypeScript version for the same secret. A stand-in phone number can still belong to someone, so keep staging from sending SMS or WhatsApp.

from lokal import parse_qris, set_qris_amount info = parse_qris(payload) # the text inside the merchant's QRIS code info.valid, info.type, info.merchant_name, info.nmid, info.criteria_label # (True, 'static', 'KOPI CONTOH', 'ID1026000000001', 'Usaha Mikro') dynamic = set_qris_amount(payload, 25000, tip_percent='0.7') # same merchant, Rp25.000 + 0.7%, new CRC parse_qris reports a broken or altered code (CRC tidak cocok: …) and anything that is not QRIS. set_qris_amount takes int, str, or Decimal amounts and refuses more than 2 decimals instead of rounding.

Validating API input

from pydantic import BaseModel, field_validator from lokal import normalize_phone, parse_nik class Pelanggan(BaseModel): nik: str hp: str @field_validator('nik') @classmethod def nik_valid(cls, v: str) -> str: info = parse_nik(v) if not info.valid: raise ValueError(info.errors[0].message) # 'Tanggal lahir di NIK tidak valid.' return info.nik @field_validator('hp') @classmethod def hp_e164(cls, v: str) -> str: e164 = normalize_phone(v) if e164 is None: raise ValueError('Nomor HP tidak valid.') return e164 # store +62… Same results as TypeScript

The test suite replays vectors generated from @lokal-id/core: hundreds of NIK, NPWP, phone, and Rupiah inputs, every day of 2026 and 2027, all 91,000 regions with their postal codes, and 2,700 texts for Samaran, including WhatsApp exports, SQL dumps, emoji, no-break spaces, and CRLF. Python must return exactly what TypeScript returns. The file readers are checked the same way against the MCP server's: real PDFs from Chrome and ReportLab, an Excel export, a Word letter, hand-built PDFs for each structure the reader handles, and damaged copies of them. On top of that, 40,000 random texts, 11 MB of real files, and 63 real PDFs of up to 1,000 pages gave identical results during development.

To get there the port keeps JavaScript semantics where they differ from Python's: ASCII \d, \w and \b; JavaScript's whitespace set; Math.round instead of round-half-even; regex lengths counted in UTF-16 units, as a JavaScript regex counts them.

Where Python offers more, it uses it:

Pure Python, no regex compilation at call time: masking a chat message takes about 0.2 ms, a 4 KB prompt about 5 ms, and a log record through SamaranFilter about 0.1 ms. Large inputs run at roughly 0.3 to 1 MB per second, depending on how much personal data they hold, linear in size, including single-line JSON and hostile input such as a megabyte of labels on one line (stress test). import lokal takes about 0.1 s; region data loads on first use in about 0.25 s and 20 MB.

Samaran is pattern-based and favors precision: on free text it has not seen it catches about 82 to 88% of personal values. A name with no cue that is also an everyday word or is not a common Indonesian name, health or financial data phrased in a new way, and children's data that is not marked as such can still slip through. NIK and NPWP checks are structural, and holidays exist only for years whose SKB has been published (2026, 2027). See the Lokal README for the full list.

Code: MIT. Region data from cahyadsn/wilayah and postal codes from cahyadsn/wilayah_kodepos, both MIT, included in the package with their licenses.

Released: Nov 29, 2026

Author: Lokal contributors

MIT View SPDX License List

hari-libur indonesia kode-pos llm masking nik npwp pii privacy rupiah terbilang uu-pdp wilayah

Development Status 4 - Beta

Intended Audience Developers

Natural Language Indonesian

Operating System OS Independent

Programming Language Python :: 3

Software Development :: Libraries

Release files for lokal-id 0.18.3

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

Source distribution (sdist)

Built distribution (wheel)

Total release size: 2.7 MB

Release files / lokal_id-0.18.3.tar.gz

Release files / lokal_id-0.18.3-py3-none-any.whl

Security for lokal-id 0.18.3

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

Nov 29, 2026 2 release files No provenance

Nov 19, 2026 2 release files No provenance

Nov 4, 2026 2 release files No provenance

Oct 31, 2026 2 release files No provenance

Oct 30, 2026 2 release files No provenance

Oct 29, 2026 2 release files No provenance

Oct 28, 2026 2 release files No provenance

Oct 26, 2026 2 release files No provenance

Oct 23, 2026 2 release files No provenance

Oct 22, 2026 2 release files No provenance

Oct 21, 2026 2 release files No provenance

Oct 17, 2026 2 release files No provenance

Oct 16, 2026 2 release files No provenance

Yanked reason: Built from a stale checkout; use 0.2.3

"PyPI", "Python Package Index", and the blocks logos are registered trademarks of the Python Software Foundation.

© 2026 Python Software Foundation

Deployed from fc0d8e6

Source Attribution: This report incorporates information referenced or syndicated from Pypi.org. Read original coverage at Pypi.org.

More from Technology →
Haldwani Times
Haldwani Times Independent News & Editorial
Login
MARKETS & FINANCE
BRENT CRUDE: $78.40 -0.52% SENSEX: 81,450.20 +0.42% NIFTY 50: 24,820.15 +0.38% GOLD (24K): ₹74,500/10g -0.18% USD/INR: ₹95.54 +0.10%

ADMINISTRATIVE LEADERSHIP

Mr. Narendra Modi
Mr. Narendra Modi
Mr. Lt. Gen. Gurmit Singh
Mr. Lt. Gen. Gurmit Singh
Mr. Pushkar S. Dhami
Mr. Pushkar S. Dhami
Mr. Lalit M. Rayal
Mr. Lalit M. Rayal
Mr. Gajraj S. Bisht
Mr. Gajraj S. Bisht

Top Headlines & Breaking Stories

View All News →

Haldwani Times – Everything in Haldwani: News, Shops, Businesses & Services

Haldwani Times is the premier digital news and commercial discovery platform built specifically for the citizens, business owners, students, professionals, and visitors of Haldwani, Nainital district, and the wider Kumaon region of Devbhoomi Uttarakhand. As the economic gateway to the Kumaon Himalayas, Haldwani is a bustling metropolis connecting the plains of northern India with the scenic mountain districts of Nainital, Almora, Pithoragarh, Bageshwar, Champawat, and Udham Singh Nagar. Haldwani Times serves as the definitive digital heartbeat of the city, bringing breaking hyperlocal news, verified commercial directories, educational updates, healthcare guides, Mandi Bhav rates, and civic announcements onto a single unified, trusted platform.

The Definitive Source for Breaking Haldwani News & Civic Updates

Haldwani stands as one of the fastest-growing urban conglomerates and commercial engines in northern India. Positioned in the fertile Terai-Bhabhar belt at the foothills of the Shivalik range, the twin cities of Haldwani and Kathgodam form the administrative and logistical nerve center for the entire Kumaon division. With rapid urbanization, expanding commercial infrastructure, flourishing educational centers, and increasing inter-state transit, the demand for fast, fact-checked, and unbiased local journalism has never been greater. Haldwani Times delivers 24/7 comprehensive news coverage built on rigorous journalistic standards: - **Hyperlocal Civic News:** Real-time coverage of municipal corporation affairs, city drainage projects, traffic management blueprints, and road widening drives across Tikonia, Mukhani, Kusumkhera, Bareilly Road, and Rampur Road. - **Administrative Directives:** Official notifications from the District Magistrate (DM) Nainital, Senior Superintendent of Police (SSP), and state secretariat decisions affecting citizen welfare. - **Kumaon Weather & Disaster Alerts:** Timely mountain rainfall warnings, landslide advisories along NH-109 (Haldwani-Nainital Highway), and emergency bulletins during the monsoon and winter seasons. - **Education & Campus News:** Timely reports on Kumaon University examination schedules, Uttarakhand Board (UBSE) results, medical college admissions, and competitive coaching updates. - **Commercial & Market Trends:** Daily wholesale Mandi Bhav rates from Haldwani Subzi Mandi, real estate trends, retail market festivals, and local business openings. - **Cultural & Pahadi Heritage:** In-depth feature stories celebrating Kumaoni folk traditions, Aipan art, Nanda Devi festivals, and local community milestones.

Everything in Haldwani on One Unified Digital Ecosystem

Beyond traditional news reporting, Haldwani Times is engineered as an exhaustive local discovery engine. Historically, finding verified local business telephone numbers, emergency hospital contacts, specialized doctors, reliable plumbers, or trusted real estate consultants in Haldwani required asking neighbors or browsing outdated social media posts. Haldwani Times eliminates this friction by organizing every commercial, professional, and civic resource into searchable, verified categories. Whether you are a newly arrived resident in Kusumkhera looking for high-speed broadband providers, a parent searching for reputable CBSE schools near Kaladhungi Road, or a tourist seeking taxi rentals to Nainital, our portal delivers accurate, verified, and actionable information in seconds.

Local Shops, Retail Hubs & Traditional Bazaars in Haldwani

The retail commerce of Haldwani spans centuries-old traditional bazaars and modern commercial complexes: - **Bada Bazaar & Mangal Parao:** The historic retail heart of Haldwani, renowned for traditional Kumaoni wedding jewelry (Pauji, Guloband, Nath), brass utensils, ethnic handlooms, and wholesale clothing. - **Nainital Road & Tikonia Commercial Corridor:** Modern multi-brand retail showrooms, electronics stores, authorized smartphone service centers, branded footwear outlets, and international apparel stores. - **Bareilly Road & Rampur Road Trade Hubs:** Major agricultural machinery dealers, hardware and building material wholesalers, furniture manufacturing units, plywood distributors, and automobile showrooms. - **Subzi Mandi & Wholesale Grain Market:** One of the largest agricultural distribution centers in North India, supplying fresh vegetables, hill fruits (apples, peaches, plums), and organic Pahadi pulses (Gahat, Bhatt, Rajma) across northern states.

Healthcare Hub of Kumaon: Hospitals & Emergency Services

Haldwani serves as the premier medical lifeline for all six hill districts of Kumaon. Patients travel from Almora, Pithoragarh, Bageshwar, and Champawat to access specialized clinical treatments in Haldwani: - **Government Healthcare Institutions:** Dr. Susheela Tiwari Government Medical College & Hospital (STGH) and Base Hospital Haldwani provide tertiary trauma care, specialized super-specialties, pediatric ICUs, and 24/7 emergency response. - **Private Multi-Specialty Hospitals:** Advanced private medical centers specializing in cardiology, joint replacements, neurology, critical care, nephrology, and advanced laparoscopic surgeries. - **Diagnostic Centers & 24/7 Pharmacies:** Fully automated pathology laboratories, high-resolution MRI/CT scan centers, and round-the-clock emergency pharmacies clustered around Medical College Road, Kaladhungi Road, and Rampur Road.

Education, Colleges, Coaching Academies & Youth Development

Haldwani is the educational capital of the Kumaon region, home to thousands of ambitious students preparing for medical, engineering, defense, and civil services careers: - **Premier Degree Colleges:** Motiram Baburam Government Post Graduate College (MBPG College) and Women's Degree College providing extensive undergraduate and postgraduate humanities, commerce, and science programs. - **Competitive Coaching Ecosystem:** Highly reputed coaching academies for NEET UG, JEE Main & Advanced, UPSC Civil Services, UKPSC/UKSSSC, NDA, CDS, and Banking examinations along Kaladhungi Road and Tikonia. - **Affiliated Schooling Infrastructure:** Esteemed CBSE, ICSE, and Uttarakhand Board schools imparting value-based holistic education with modern sports and laboratory facilities.

Real Estate, Housing Colonies & Urban Expansion Trends

Driven by rapid infrastructure expansion and high quality of life, Haldwani's real estate market is expanding outward into organized residential colonies: - **Prime Residential Localities:** Highly sought-after residential sectors in Mukhani, Kusumkhera, Kaladhungi Road, Judge Farm, Daharia, and Bhotia Parao offering planned housing, green parks, and modern civic amenities. - **Commercial Property Investments:** Thriving commercial retail complexes, office spaces, and warehouse hubs developing rapidly along the proposed Haldwani Ring Road and transport corridors. - **Property Advisory & RERA Compliance:** In-depth real estate updates, circle rate revisions by the Nainital district administration, and buyer advisory guidelines for safe property acquisitions.

Strategic Transit Gateway, Tourism Routes & Kumaon Himalayan Connectivity

Haldwani-Kathgodam is the vital transit bridge connecting the plains of Delhi NCR and Uttar Pradesh with the hill stations of Uttarakhand: - **Kathgodam Railway Terminal:** Connecting Kumaon directly to New Delhi (Shatabdi Express, Ranikhet Express), Lucknow, Kolkata, Jammu, and Dehradun. - **ISBT Haldwani:** Operating round-the-clock interstate and mountain bus routes managed by Uttarakhand Transport Corporation (UTC) and private deluxe coaches. - **Pantnagar Airport (PGH):** Located just 26 km from Haldwani, offering scheduled domestic flights to New Delhi, Dehradun, Pithoragarh, and regional hubs. - **Himalayan Tourism Hub:** The primary staging point for journeys to Nainital (34 km), Bhimtal (30 km), Mukteshwar (72 km), Kainchi Dham (42 km), Almora (90 km), Ranikhet (80 km), and Jim Corbett National Park (55 km).

Gaula River Mining, Ecological Balance & The Bhabhar Economy

The Gaula River represents the undisputed economic and hydrological lifeline of Haldwani and the broader Nainital district. Originating from the Sattal-Bhimtal catchment in the lesser Himalayas, the river flows south past Kathgodam and Haldwani before merging into the Ramganga. For generations, the Gaula riverbed has provided the foundation for both regional agriculture and the construction economy across northern India: - **Regulated Minor Mineral Extraction:** During the open mining season (typically October to May), thousands of registered tractor-trolleys and heavy dumpers harvest riverbed gravel, sand, and boulders under strict surveillance by the Uttarakhand Forest Development Corporation and the Nainital district administration. - **Livelihood Support for Over 50,000 Families:** The Gaula mining economy directly and indirectly sustains vehicle owners, drivers, mechanics, diesel pump stations, roadside eateries, and local laborers, circulating over ₹500 crore into Haldwani's local markets annually. - **Environmental Safeguards & Flood Mitigation:** In strict adherence to High Court and National Green Tribunal (NGT) directives, scientific replenishment studies, satellite GPS tracking on transport vehicles, and seasonal mining bans during the monsoon protect the river's ecological balance and prevent bank erosion along low-lying residential sectors.

Culinary Landscape: From Traditional Kumaoni Rasoi to Modern Cafes

Haldwani's gastronomic scene reflects a delightful blend of rustic mountain traditions and cosmopolitan dining: - **Authentic Kumaoni Specialties:** Local restaurants and heritage dhabas serve traditional mountain delicacies cooked in iron vessels, including Bhatt ki Churkani (black soybean curry), Gahat ke Dubke (horsegram puree), Aloo ke Gutke tempered with wild Himalayan chives (Jamboo) and Jakhiya, and refreshing cucumber Raita flavored with freshly crushed mustard seeds. - **Traditional Confectioneries:** Historic sweet shops along Bada Bazaar and Nainital Road craft Almora's world-famous Bal Mithai (roasted caramelized khoya fudge coated in sugar balls) and Singaudi (sweetened khoya wrapped in wild Malu leaves). - **Vibrant Street Food & Cafe Culture:** As dusk falls, Tikonia and Nainital Road come alive with bustling street food stalls offering steaming Tibetan momos, spiced thukpa, Kathi rolls, and hot Masala Chai, alongside modern rooftop cafes serving specialty Italian coffees and continental snacks.

Cultural Festivals, Folk Heritage & The Aipan Art of Kumaon

Beyond commercial enterprise, Haldwani is the proud cultural showcase of Devbhoomi Uttarakhand: - **Aipan Folk Art Tradition:** The sacred geometrical floor and wall art handcrafted with red ochre (Geru) and white rice paste (Biswar) adorning thresholds, altars, and chowkis during auspicious ceremonies, now preserved through local women's self-help cooperatives. - **Classical Baithki & Khadi Holi:** Unique to Kumaon, musical celebrations starting as early as the month of Paush, featuring classical Hindustani ragas sung in community courtyards followed by energetic Chholiya dance performances during spring. - **Nanda Devi & Chholiya Heritage:** Grand annual fairs celebrating the patron deity Nanda Devi, accompanied by martial sword-and-shield Chholiya dancers whose rhythmic brass trumpets (Ransingha) and hurka drums resonate through the valley.

Public Amenities, Parks & Community Spaces in Haldwani

Urban lifestyle and recreational infrastructure in the city: - **Green Parks & Walking Tracks:** Walkway projects around Daharia, Judge Farm, and Awas Vikas providing lush recreational zones for families and seniors. - **Community Centers & Sports Grounds:** Multi-purpose auditoriums and grounds hosting cultural melas, badminton tournaments, and community celebrations. - **Gaula Barrage & Forest Trails:** Scenic river viewpoints and natural birdwatching areas attracting eco-tourists and local nature enthusiasts on weekends.

Frequently Asked Questions (FAQs)

How can I access live breaking news and weather alerts for Haldwani?

Haldwani Times operates a dedicated 24/7 hyperlocal newsroom providing real-time breaking bulletins, traffic alerts, and meteorological warnings. You can access live news directly from our homepage, subscribe to instant browser push notifications, or view categorical updates on Uttarakhand, Education, and Mandi Bhav. During monsoon and winter weather events, our correspondents provide live updates on NH-109 road blockages and emergency administrative orders issued by the Nainital District Magistrate.

Is Haldwani Times completely free to read for all visitors?

Yes, Haldwani Times offers completely unrestricted, open-access reading to all users without mandatory paywalls. Readers across Haldwani, Uttarakhand, and the global diaspora can freely browse all breaking news reports, investigative articles, business directory listings, and historical archives. Our public-interest mission ensures that essential civic information, emergency hospital directories, and educational circulars remain universally accessible to everyone at zero cost.

How can local business owners list their shop or service in the Haldwani directory?

Local merchants, medical practitioners, schools, and service professionals can register their business by navigating to our 'Business Directory' page and selecting 'Add Listing'. The registration process allows you to input your business name, address, contact numbers, operational hours, services offered, and high-resolution showroom photographs. Once submitted, our local verification team verifies the physical address within 24 hours to ensure high consumer trust and top ranking on Google.

Can I read Haldwani Times articles in Hindi as well as English?

Yes, Haldwani Times features a seamless, native bilingual reading experience tailored for our regional readership. With our one-click language toggle located prominently in the navigation bar, you can instantly switch between English and pure Hindi. Both versions feature carefully crafted editorial phrasing, accurate regional terminology, and culturally resonant storytelling to ensure maximum readability for students, families, and senior citizens alike.

How do I submit news tips, event notices, or press releases to the editorial team?

Our newsroom warmly welcomes verified news tips, community event notices, civic grievances, and official press releases from citizens and local organizations. You can submit your documents, photos, or video evidence directly to our central editorial desk at editorial@haldwanitimes.com or via our Help & Support page. Our senior editors review every submission for factual authenticity, multi-source verification, and public relevance prior to publication.

Where can visitors find authentic Kumaoni Bal Mithai and Singaudi in Haldwani?

Renowned traditional sweet houses clustered along Bada Bazaar, Mangal Parao, Kathgodam Station Road, and Nainital Road specialize in daily batches of authentic Bal Mithai and fragrant Singaudi prepared with pure mountain dairy khoya and natural ingredients.

What transportation options are available for traveling from Haldwani to Nainital and Bhimtal?

Continuous state transport buses (UTC), KMOU coaches, and registered taxi union sharing cabs operate 24/7 from the Haldwani Roadways Bus Station (near Tikonia) and Kathgodam Railway Station. Fares are regulated by the transport department, with mountain travel times ranging between 1 to 1.5 hours.