MCPcopy Index your code
hub / github.com/PostmonAPI/postmon / cidade

Function cidade

PostmonServer.py:131–142  ·  view source on GitHub ↗
(sigla_uf, nome)

Source from the content-addressed store, hash-verified

129
130@app_v1.route('/cidade/<sigla_uf>/<nome>')
131def cidade(sigla_uf, nome):
132 db = Database()
133 result = _get_cidade_info(db, sigla_uf, nome)
134 if result:
135 response.headers['Cache-Control'] = 'public, max-age=2592000'
136 return format_result(result)
137 else:
138 message = '404 A cidade %s (%s) informada ' \
139 'nao pode ser localizada'
140 response.status = message % (sigla_uf, nome)
141 print response.status
142 return
143
144
145@app_v1.route('/rastreio/<provider>/<track>')

Callers

nothing calls this directly

Calls 2

_get_cidade_infoFunction · 0.85
format_resultFunction · 0.85

Tested by

no test coverage detected