{ "info": { "author": "RedTurtle Technology", "author_email": "sviluppoplone@redturtle.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Framework :: Plone", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "Introduction\n============\nThis package provides vocabulary for all italian 'enti territoriali'.\nFor storage we are using sqlite3 database wrapped with sqlalchemy.\n\nFirst lets import the vocabulary (which should have already a vocabulary object)::\n\n >>> from redturtle.entiterritoriali import EntiVocabulary as EV\n\nNow let's try the simple query: for regione, provincia and comune::\n\n >>> EV.regione('Emilia-Romagna')\n MappedRegioni(regione=u'Emilia-Romagna',...)\n\n >>> EV.provincia('Ferrara')\n MappedProvince(provincia=u'Ferrara',...)\n\n >>> EV.comune('Ferrara')\n MappedComuni(comune_id=4105,comune=u'Ferrara',...)\n\n\nThen let's check if we have all of them::\n\n >>> len(EV.allRegioni())\n 20\n\n >>> len(EV.allProvince())\n 108\n\n >>> len(EV.allComuni())\n 8101\n\n\nNow we can try to use `like` statesment. We can use helper methods::\n\n >>> EV.comuniByLetter('Mod')\n [MappedComuni(comune_id=4013,comune=u'Modena',provincia=u'MO',...u'http://www.comune.modugno.ba.it/')]\n\n >>> EV.provinceByLetter('Bo')\n [MappedProvince(provincia=u'Bologna',...u'http://www.provinz.bz.it/')]\n\n >>> EV.regioniByLetter('L')\n [MappedRegioni(regione=u'Lazio',capoluogo=u'Roma'...u'postaweb@regione.lombardia.it')]\n\n\n... but you can also build your own filters using sqlalchemy and pass them as list of arguments::\n\n >>> sql_filter1 = (EV.engine.comuni.provincia == 'BO')\n >>> sql_filter2 = (EV.engine.comuni.comune.like('Gal%'))\n >>> EV.comuni([sql_filter1, sql_filter2])\n [MappedComuni(comune_id=4065,comune=u'Galliera',...http://www.comune.galliera.bo.it/')]\n\n\nYou can find more at http://www.sqlalchemy.org/docs/05/ormtutorial.html#querying\n\nNow some more advanced querying - getting all comuni for provincia::\n\n >>> EV.comuni4provincia('BO')\n [MappedComuni(comune_id=4038,comune=u\"Anzola dell'Emilia\"...u'http://www.comune.zolapredosa.bo.it/')]\n\nand all province for given regione::\n\n >>> EV.province4regione('03') #Lombardia\n [MappedProvince(provincia=u'Bergamo',...sito_provincia=u'http://www.provincia.va.it/')]\n\n\nFinally we can also map vocabulary to DisplayList (for Archetypes use case)::\n\n >>> from redturtle.entiterritoriali.vocabulary import mapDisplayList\n >>> mapDisplayList(EV.allRegioni())\n [(u'13', u'Abruzzo'), (u'17', u'Basilicata'),...(u'05', u'Veneto')]\n\n\nBut it should work also for different enti in one vocabulary, like here::\n\n >>> regione1 = EV.regione('Lombardia')\n >>> comune1 = EV.comune('Ferrara')\n >>> enti = [regione1,comune1]\n >>> mapDisplayList(enti)\n [(u'03', u'Lombardia'), (u'038008', u'Ferrara')]\n\n\nCredits\n=======\n\nDeveloped with the support of `Regione Emilia Romagna`__; Regione Emilia Romagna supports the `PloneGov initiative`__.\n\n__ http://www.regione.emilia-romagna.it/\n__ http://www.plonegov.it/\n\n\nAuthors\n=======\n\nThis product was developed by RedTurtle Technology team.\n\n.. image:: http://www.redturtle.net/redturtle_banner.png\n :alt: RedTurtle Technology Site\n :target: http://www.redturtle.it/\n\n\nData credits\n------------\n* `Italian National Institute of Statistics`__\n\n.. image:: http://en.istat.it/images/istat.gif\n :alt: ISTAT - logo\n\n__ http://en.istat.it/\n\nHISTORY\n=========\n\n0.4.0 (2016-08-02)\n------------------\n\n- update new Emilia-Romagna merged comuni [cekk]\n\n\n0.3.3 (2014-11-10)\n------------------\n\n- fix massafiscaglia site url [cekk]\n\n\n0.3.2 (2014-11-07)\n------------------\n\n- fix import for sqlsoup [cekk]\n\n\n0.3.1 (2014-11-07)\n------------------\n\n- updated with new italian districts [cekk]\n\n\n0.3 (2013-12-16)\n----------------\n\n- compatibility with SQLAlchemy 0.8 [amleczko]\n\n\n0.2.2 (2013-11-12)\n------------------\n\n- fixed site url for Zerba [cekk]\n\n\n0.2.1 (2013-08-20)\n------------------\n * fixed codice istat for Casteldelci, Maiolo, Novafeltria, Pennabilli, San Leo, Sant'Agata Feltria, Talamello [cekk]\n\n0.2 (2011-08-03)\n----------------\n * cleanup, docs update [amleczko]\n\n0.1.10 (2011-07-08)\n-------------------\n * fixed bertinoro website [cekk]\n\n0.1.9 (2011-05-16)\n------------------\n * fixed casalfiumanese website [cekk]\n\n0.1.8 (2011-04-18)\n------------------\n * fixed some other websites [cekk]\n\n0.1.7 (2011-04-08)\n------------------\n * fixed some other websites [cekk]\n\n0.1.6 (2011-03-28)\n------------------\n * fixed other websites for some comuni [cekk]\n\n0.1.5 (2011-03-21)\n------------------\n * added new websites for some comuni [cekk]\n\n0.1.4 (2010-09-01)\n------------------\n * declaring egg zip unsafe, otherwise it is not possible to access sqllite db [alert]\n\n0.1.3 (2010-08-31)\n------------------\n * UTF-8 fixes [keul]\n\n0.1.2 (2009-10-09)\n------------------\n * move Casteldelci, Maiolo, Novafeltria, Pennabilli, San Leo, \n Sant'Agata Feltria and Talamello to Rimini province [amleczko] \n\n0.1.1 (2009-10-06)\n------------------\n * SQLite3Vocab is now singleton - you should always use \n 'from redturtle.entiterritoriali import EntiVocabulary' not SQLite3Vocab directly\n [amleczko]\n\n0.1.0 (2009-07-07)\n------------------\n * Refactoring [amleczko]\n\n0.0.4 (2009-06-24)\n------------------\n * Add Monza e della Brianza province [amleczko]\n\n0.0.3 (2009-06-11)\n------------------\n * Add EntiCriteria (topic criteria) and all functionality behind it [amleczko]\n\n0.0.2 (2009-05-24)\n------------------\n * Add the \"comuniByLetter\" method used to catch comuni that start with one or more character [lucabel]\n\n0.0.1 (2009-04-20)\n------------------\n * First release [amleczko]", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://plone.org/products/redturtle.entiterritoriali", "keywords": "", "license": "GPL", "maintainer": null, "maintainer_email": null, "name": "redturtle.entiterritoriali", "package_url": "https://pypi.org/project/redturtle.entiterritoriali/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/redturtle.entiterritoriali/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://plone.org/products/redturtle.entiterritoriali" }, "release_url": "https://pypi.org/project/redturtle.entiterritoriali/0.4.0/", "requires_dist": null, "requires_python": null, "summary": "Package contatins all italian enti territoriali in sqlite db", "version": "0.4.0" }, "last_serial": 2257893, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "94f9f04479c70edaee04e27e5247835e", "sha256": "80ef7ef60eec4a58130fbff270af0c7eac54142497ba3517af25383e13654922" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.2.tar.gz", "has_sig": false, "md5_digest": "94f9f04479c70edaee04e27e5247835e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 229108, "upload_time": "2011-08-03T15:45:12", "url": "https://files.pythonhosted.org/packages/2e/09/8eb7852a2e36c47507ef7d89fc71ff175d2b8c724fd47a453756bd5f11d2/redturtle.entiterritoriali-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "205530be13b2993f0bba1cd1568bf517", "sha256": "3c3c1c8836013d2399190af303e4961a19984f4e672c83e3b5eb5778a35d6f67" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.2.1.zip", "has_sig": false, "md5_digest": "205530be13b2993f0bba1cd1568bf517", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 234399, "upload_time": "2013-08-20T15:27:22", "url": "https://files.pythonhosted.org/packages/71/f7/604201c31a049a6438fe9f0b695d501338e987481556ad0819a9ba607b5e/redturtle.entiterritoriali-0.2.1.zip" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "19cd3fe9b066b9fc5314e242eac59c90", "sha256": "7ba13f86bf2d49c6a9d5278b82fb8e7b5737606c91acf65ca8ec0aeb8f6ad290" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.2.2.zip", "has_sig": false, "md5_digest": "19cd3fe9b066b9fc5314e242eac59c90", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 234446, "upload_time": "2013-11-12T10:30:20", "url": "https://files.pythonhosted.org/packages/9b/6c/7bcfb774782790ab1e1f200cbd099686e1acf630744a2678eca4c7452ed3/redturtle.entiterritoriali-0.2.2.zip" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "3b3c95c3a0d8cbc7128ee163ed69802c", "sha256": "6eaa65b323ef33d0dfbc6157608365e12494986a629e8e6047c5ea6629b90ce6" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.3.zip", "has_sig": false, "md5_digest": "3b3c95c3a0d8cbc7128ee163ed69802c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 234452, "upload_time": "2013-12-16T08:23:13", "url": "https://files.pythonhosted.org/packages/a1/ff/92f5b329dfccd08c13e9f78fa75d492f8717b05d824f9a851623249298c4/redturtle.entiterritoriali-0.3.zip" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "8bd091c346c18515e78c97349a4435c2", "sha256": "7b2b143b06d5e6ce2761fdecaeb32cd376cbcbea384475852443416ead630cc8" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.3.1.zip", "has_sig": false, "md5_digest": "8bd091c346c18515e78c97349a4435c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 234582, "upload_time": "2014-11-07T10:30:40", "url": "https://files.pythonhosted.org/packages/88/ea/a33df27b3b53ad4c8019ece077601d9c41445b68c2602c130d0f981e26c5/redturtle.entiterritoriali-0.3.1.zip" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "30f8802ef4136328f5d581593876272a", "sha256": "25b1f5238c36777d8c22d124e734326efe429c350e6f74ce6b7a3152fcdeea17" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.3.2.zip", "has_sig": false, "md5_digest": "30f8802ef4136328f5d581593876272a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 234624, "upload_time": "2014-11-07T16:47:31", "url": "https://files.pythonhosted.org/packages/ee/b3/f09fb0e78bb0329bb5740d7b9ebef364d9f6dc2cd816a5bf73c93090aeca/redturtle.entiterritoriali-0.3.2.zip" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "006d77f3cca940ffea85033bf4570d29", "sha256": "8b3e88b4ea0d43582384e7a41b6d5432ee75b5bd2f89c76e0352af6787ff6a8f" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.3.3.zip", "has_sig": false, "md5_digest": "006d77f3cca940ffea85033bf4570d29", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 234698, "upload_time": "2014-11-10T08:09:14", "url": "https://files.pythonhosted.org/packages/46/4d/6461791d0912dcad4554c7d17734c92bf13aaf55fd4c285350fcabd96449/redturtle.entiterritoriali-0.3.3.zip" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "cd261897c570c6b671c5fa800742edfe", "sha256": "22106dae64e0023b75d62b3c4df5b23ed02725f4a3811773b77fb185ef01c8b5" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.4.0.tar.gz", "has_sig": false, "md5_digest": "cd261897c570c6b671c5fa800742edfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 229404, "upload_time": "2016-08-02T14:23:22", "url": "https://files.pythonhosted.org/packages/f9/ef/82ee035bab268cf319f8d0952e19f331a3e31dedcc136ac8855e069e1822/redturtle.entiterritoriali-0.4.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "cd261897c570c6b671c5fa800742edfe", "sha256": "22106dae64e0023b75d62b3c4df5b23ed02725f4a3811773b77fb185ef01c8b5" }, "downloads": -1, "filename": "redturtle.entiterritoriali-0.4.0.tar.gz", "has_sig": false, "md5_digest": "cd261897c570c6b671c5fa800742edfe", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 229404, "upload_time": "2016-08-02T14:23:22", "url": "https://files.pythonhosted.org/packages/f9/ef/82ee035bab268cf319f8d0952e19f331a3e31dedcc136ac8855e069e1822/redturtle.entiterritoriali-0.4.0.tar.gz" } ] }