Contribution: Python API Client 🔥

Hiya! I’ve written a fairly comprehensive Python wrapper for the OneMap API! :fire:

Hope it helps anyone who needs it (:
You can find it here: https://github.com/methylDragon/one-map-api-client

It automatically refreshes tokens once you authenticate if it ever expires.

Hi @methylDragon

Thanks for your contribution!

It’s impressive!

We will compile all community efforts that contribute to API as a client connection in a single discussion thread.

Thanks for this great work! Can I check with you, for the class methods of getting the routes, what is the actual data type of the start_coordinates / end_coordinates?

I put them for example a string ‘1.3642639,103.8430657’ or a tuple (1.3642639,103.8430657). They both turn out to give error ‘tuple index out of range’.:thinking:

Hi byron,

sorry I got back to this so late. There was a bug in the string formatting before my client sends over the JSON data.

I’ve released a patch already.

You can update via: “pip install onemapsg -U”

Cheers!

Impressive sharing, thank you!

I’d like to share my attempt to put the planning area into polygons in kml:

Thank you.