country_acronyms
1.0.0
Paket ini dibuat untuk semua orang yang perlu menemukan semua terjemahan yang mungkin, akronim untuk nama negara tertentu / negara ISO.
country_acronyms memberikan dukungan untuk:
Kode ini hidup dalam repositori git di GitHub, dan masalah harus dilaporkan di sana juga.
Instal country_acronyms dengan menjalankan:
pip install country_acronyms from country_acronyms import get_supported_languages ,
get_country_acronyms ,
get_country_acronyms_iso ,
get_all_country_acronyms
# get available languages
get_supported_languages ()
> >> { 'afrikaans' : 'af' , 'albanian' : 'sq' , ... , 'yoruba' : 'yo' , 'zulu' : 'zu' }
# acronyms for given country name
get_country_acronyms ( "Austria" )
> >> { 'af' : 'Oostenryk' , ... , 'zu' : 'E-Austria' }
# acronyms for given country iso
get_country_acronyms_iso ( "it" )
> >> { 'af' : 'Italië' , ... , 'zu' : 'Italy' }
# acronyms for given country iso
get_country_acronyms_iso ( "usa" )
> >> { 'af' : 'Verenigde State' , ... , 'zu' : 'iziwe Ezihlangene' }
# getting all country acronyms by scraping wiki
get_all_country_acronyms ()
> >> { 'Abkhazia' : [ 'Abcasia' , ... , 'Apxazeti' ], , 'Afghanistan' : [ 'Æfganisthanaya' , ... , 'l-Afghanistan' ], ... }Paket ini menggunakan Deep_translator, Pycountry dan BS4. Besar untuk itu!
Proyek ini dilisensikan di bawah lisensi MIT.