oktmoparser

Simple and useful parser that helps you get actual All-Russian Classifier of Municipal Territories (OKTMO)


Keywords
oktmo, parser, municipal, territory, classifier
License
MIT
Install
pip install oktmoparser==1.3.2

Documentation

All-Russian Classifier of Municipal Territories (OKTMO) Parser

What is this?

Simple and useful parser that helps you get actual All-Russian Classifier of Municipal Territories (OKTMO).

Install

pip install oktmoparser

Quick Guide

The parser is based on the following structure:

parser = OktmoParser()
start_keyword = ''
end_keyword = ''
parser.parse_oktmo(start_keyword, end_keyword)

Parser returns .json file with actual OKTMO from Federal State Statistics Service.


Using

Using the library is as simple and convenient as possible:

  1. Import:

from OktmoParser import OktmoParser

  1. Create object:

parser = OktmoParser()

  1. Set start_keyword value and end_keyword value.

Notice: for the first usage set it empty to get full .json file to see the structure and then you can set your values.

Examples:

start_keyword = 'ΠœΡƒΠ½ΠΈΡ†ΠΈΠΏΠ°Π»ΡŒΠ½Ρ‹Π΅ образования ΠŸΡ€ΠΈΠΌΠΎΡ€ΡΠΊΠΎΠ³ΠΎ края'
end_keyword = 'ΠœΡƒΠ½ΠΈΡ†ΠΈΠΏΠ°Π»ΡŒΠ½Ρ‹Π΅ образования Π‘Ρ‚Π°Π²Ρ€ΠΎΠΏΠΎΠ»ΡŒΡΠΊΠΎΠ³ΠΎ края'

You will get all rows between this municipal territories.

  1. Parse and get .json file:

parser.parse_oktmo(start_keyword, end_keyword)

  1. That's it.

Developer

@letimvkocmoc