Skip to main content

CLI and Python library for Singapore OneMap APIs — search, geocode, routing, themes, population data, and more

Project description

onemap-sg-cli

CLI and Python library for OneMap Singapore APIs — search, geocode, routing, thematic layers, demographics, and URA property data.

Install

pip install onemap-sg-cli

Or with pipx:

pipx install onemap-sg-cli

Or with uvx (no install needed):

uvx onemap-sg-cli search "Orchard Road"

Setup

Set environment variables (or create a .env file):

export ONEMAP_EMAIL="your@email.com"
export ONEMAP_EMAIL_PASSWORD="your_password"

# Optional: URA property data
export URA_ACCESS_KEY="your_ura_key"

Get credentials:

CLI Usage

# Search
onemap search "Orchard Road"

# Route finding — accepts addresses, postal codes, or lat,lon
onemap route transit "Chinese Garden MRT" "One Raffles Quay"
onemap route transit "Chinese Garden MRT" "One Raffles Quay" --time "09:00"

# Coordinate conversion
onemap convert wgs84-to-svy21 1.342 103.732

# Demographics
onemap pop age "Bedok" 2020

# Nearby transport
onemap nearby mrt 1.342 103.732 --radius 2000

# Static map
onemap map default --lat 1.342 --lon 103.732 -o map.png

See onemap --help for all commands.

Python Library

import asyncio
import onemap_sg

result = asyncio.run(onemap_sg.search("Orchard Road"))
route = asyncio.run(onemap_sg.route_public_transport(
    1.342, 103.732, 1.281, 103.852,
    departure_time="2026-06-08T09:00:00+08:00", mode="TRANSIT",
))

Hermes Skill

One-line install for Hermes agent:

curl -sSL https://raw.githubusercontent.com/samuelncui/onemap-sg-cli/main/install-skill.sh | bash

Then /reset in Hermes to load it.

License

MIT

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

onemap_sg_cli-0.1.0.tar.gz (26.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

onemap_sg_cli-0.1.0-py3-none-any.whl (29.7 kB view details)

Uploaded Python 3

File details

Details for the file onemap_sg_cli-0.1.0.tar.gz.

File metadata

  • Download URL: onemap_sg_cli-0.1.0.tar.gz
  • Upload date:
  • Size: 26.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for onemap_sg_cli-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6b55eaec4d9b2a18529739dc17cb4e6966a979723f39b1824a6e37a4f7eac469
MD5 e70874c8206076765ef03c66aa840f6c
BLAKE2b-256 ec4385574e94de642a4095be73312d26212814f4420c2387b32a1edde41830fc

See more details on using hashes here.

Provenance

The following attestation bundles were made for onemap_sg_cli-0.1.0.tar.gz:

Publisher: workflow.yml on samuelncui/onemap-sg-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file onemap_sg_cli-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: onemap_sg_cli-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 29.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for onemap_sg_cli-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 de46553578e350505db0f7e299b820dca51d7d5f92a9e03d877d9be44e24f2a8
MD5 488f5d8a2c26f8b3685da559908cec85
BLAKE2b-256 c94c76f64ae26686911604d07efc3a73a6a1240114ed2692d86678d75d494470

See more details on using hashes here.

Provenance

The following attestation bundles were made for onemap_sg_cli-0.1.0-py3-none-any.whl:

Publisher: workflow.yml on samuelncui/onemap-sg-cli

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page