Skip to main content

madura_api

A Python API to access online madura dictionary

Usage

Install the package

pip3 install madura-api

Example 1

from madura_api import translate

result_list=translate('Home')
print(result_list)

result_list is a list of lists like this,

[
    ['n.', 'ආල'],
    ['n.', 'ආලය'],
    ['n.', 'උත්පත්ති ස්ථානය'],
    ['n.', 'උන්හිටි තැන'],
    ['n.', 'ගෘහය'],
    ['n.', 'ගෙදර'],
    ['a.', 'ගෙදර පිළිබඳ වූ'],
    ['vi.', 'ගෙදරට ආපසු පැමිණෙනවා'],
    ['n.', 'ගේ'],
    ['n.', 'ගේදොර'],
    ['n.', 'ඝර'],
    ['n.', 'නිවස'],
    ['n.', 'නිවහන'],
    ['n.', 'නිවාසය'],
    ['n.', 'නිවෙස'],
    ['Ele.', 'නිවෙසනවා'],
    ['Ele.', 'නිවෙසීම'],
    ['n.', 'පදිංචිය'],
    ['Soc.', 'පවුල'],
    ['Soc.', 'ස්වදේශ'],
    ['n.', 'සියරට']
]

Example 2

from madura_api import translate

result_list=translate('පොත')
print(result_list)

result_list is a list of lists like this,

[
    ['n.','bood'],
    ['n.', 'book'],
    ['n.', 'scroll']
]

  • If there is no result, translate function will return False

Example 3

from madura_api import translate

result_list=translate('meen')
print(result_list)
False

Advanced Usage (Suggestions)

Example 4

This is how you translate something if you wanna work with suggestions

import madura_api

result=madura_api.Translate('home')
print(result.list)
[
    ['n.', 'ආල'],
    ['n.', 'ආලය'],
    ['n.', 'උත්පත්ති ස්ථානය'],
    ['n.', 'උන්හිටි තැන'],
    ['n.', 'ගෘහය'],
    ['n.', 'ගෙදර'],
    ['a.', 'ගෙදර පිළිබඳ වූ'],
    ['vi.', 'ගෙදරට ආපසු පැමිණෙනවා'],
    ['n.', 'ගේ'],
    ['n.', 'ගේදොර'],
    ['n.', 'ඝර'],
    ['n.', 'නිවස'],
    ['n.', 'නිවහන'],
    ['n.', 'නිවාසය'],
    ['n.', 'නිවෙස'],
    ['Ele.', 'නිවෙසනවා'],
    ['Ele.', 'නිවෙසීම'],
    ['n.', 'පදිංචිය'],
    ['Soc.', 'පවුල'],
    ['Soc.', 'ස්වදේශ'],
    ['n.', 'සියරට']
]

If you try to translate something that can't be translated it'll give you a suggestion list like this,

Example 5

import madura_api

result=madura_api.Translate('meen')
print(result.list)
[
    'meed',
    'meek',
    'meekness',
    'meerkat',
    'meerschaum',
    'meet',
    'meeting',
    'meeting adjourned', 
    'meeting annual general',
    'meeting extraordinary'
]

But you will need to know if the output you get is a suggestion or not. This how you do that,

Example 6

import madura_api

result=madura_api.Translate('meen')
print(result.is_a_suggestion)
True

Miscellaneous Stuff

If you think madura_api is a pain in the ass to type, do this

import madura_api as mapi

Metadata

Release files for madura-api 0.1.5

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

Source distribution (sdist)

Source distribution for madura-api 0.1.5
File Size Uploaded Provenance Actions
madura_api-0.1.5.tar.gz 15.6 kB Without provenance Details for madura_api-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for madura-api 0.1.5
File Interpreter ABI Platform Actions
madura_api-0.1.5-py3-none-any.whl Python 3 none any Details for madura_api-0.1.5-py3-none-any.whl

Total release size: 31.3 kB

Release files / madura_api-0.1.5.tar.gz

Download URL madura_api-0.1.5.tar.gz
Size 15.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2b51d2110ae69737fb866f566b214fb86dea80003a3649d62c8388e5cd95506a
BLAKE2b-256 checksum
How to use checksums
bf88abba4012b902ee4e04bc5724b79182820d47e92550f50a525f358417dbcc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Release files / madura_api-0.1.5-py3-none-any.whl

Download URL madura_api-0.1.5-py3-none-any.whl
Size 15.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1326a6bca8929b164601af4d1ff7cb6d4b307a8e16bede4c72662b78a382963e
BLAKE2b-256 checksum
How to use checksums
297eb560849e89f50cdb8b96b2eeaaa4f53cfe3d42b867c4637957b2bfbe19a6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.6

Security for madura-api 0.1.5

Provenance

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.

No provenance found

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page