Giter Site home page Giter Site logo

illagrenan / ares_util Goto Github PK

View Code? Open in Web Editor NEW
10.0 4.0 13.0 240 KB

Nástroj pro validaci českého IČ a získávání základních dat z ARESu.

Home Page: https://pypi.org/project/ares_util/

License: Other

Python 100.00%
python python-library government-data czechia

ares_util's People

Contributors

dependabot[bot] avatar illagrenan avatar jirikr avatar lukasrychtecky avatar magdarettigova avatar mildamade avatar pyup-bot avatar sukicz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ares_util's Issues

Ares - street

I still get zipcode in place of street name and zip_code is None, am I doing something wrong ?
For example this ICO 25834151 gives me:

{u'legal': {u'company_vat_id': u'CZ25834151', u'company_name': u'HELLA AUTOTECHNIK NOVA, s.r.o.', u'legal_form': u'112', u'company_id': u'25834151'}, u'address': {u'city': u'Mohelnice', u'region': None, u'street': u'PS\u010c 78985', u'city_part': None, u'zip_code': None}}

but the street part should be "Družstevní 338/16".

Number of request per some time interval?

Hi,

did you do performance test? Does ARES portal has some time-outs or limitation?

I don't want to use it for some crawling staff. Just on-demand user's calls. And I don't want hit some time-out or ban from ARES's side.

Thank you,
DS

Key Error when ARES returned server fault instead of valid response

We encountered an Key error when ARES return Fault element instead of element Odpoved in code

response_root = ares_data['are:Ares_odpovedi']['are:Odpoved']

Based on XSD schema, it is possible ( http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_answer_basic/v_1.0.3/ares_answer_basic_v_1.0.3.xsd ).

Data when error occurred

company_id='60159014'
ares_data=OrderedDict([(u'are:Ares_odpovedi', OrderedDict([(u'@xmlns:are', u'http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_answer_basic/v_1.0.3'), (u'@xmlns:D', u'http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_datatypes/v_1.0.3'), (u'@xmlns:U', u'http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/uvis_datatypes/v_1.0.3'), (u'@odpoved_datum_cas', u'2018-01-03T17:10:05'), (u'@odpoved_pocet', u'1'), (u'@odpoved_typ', u'Basic'), (u'@vystup_format', u'XML'), (u'@xslt', u'klient'), (u'@validation_XSLT', u'http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_odpovedi.xsl'), (u'@xmlns:xsi', u'http://www.w3.org/2001/XMLSchema-instance'), (u'@xsi:schemaLocation', u'http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_answer_basic/v_1.0.3 http://wwwinfo.mfcr.cz/ares/xml_doc/schemas/ares/ares_answer_basic/v_1.0.3/ares_answer_basic_v_1.0.3.xsd'), (u'@Id', u'ares'), (u'are:Fault', OrderedDict([(u'faultcode', u'Server.Service'), (u'faultstring', u'obecná chyba serverové služby')]))]))])```

python-3.6 'ascii' codec can't encode character '\xed'

from your example:

In [1]: from ares_util.ares import call_ares
In [2]: call_ares(42)
Out[2]: False
In [3]: call_ares('68407700')
Out[3]: ---------------------------------------------------------------------------
UnicodeEncodeError                        Traceback (most recent call last)
<ipython-input-3-d55edeea105c> in <module>()
----> 1 call_ares('68407700')
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/core/displayhook.py in __call__(self, result)
    259             self.fill_exec_result(result)
    260             if format_dict:
--> 261                 self.write_format_data(format_dict, md_dict)
    262                 self.log_output(format_dict)
    263             self.finish_displayhook()
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/IPython/core/displayhook.py in write_format_data(self, format_dict, md_dict)
    188                 result_repr = '\n' + result_repr
    189 
--> 190         print(result_repr)
    191 
    192     def update_user_ns(self, result):
UnicodeEncodeError: 'ascii' codec can't encode character '\xed' in position 75: ordinal not in range(128

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.