Saravanan666/pypi-org huggingface dataset:
Package: acdh-django-filechecker
Django-App to store, edit, enrich and serialize the results ofhttps://github.com/acdh-oeaw/repo-file-checkerQuickstartInstall acdh-django-filechecker:pip install acdh-django-filecheckerAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'filechecker',...)Update your project’s urls.py:urlpatterns=[...url(r'^filechecker-rdf/',include('filechecker.fc_arche_urls',namespace='filechecker-rdf')),url(r'^filechecker/',include('filechecker.urls',namespace='filechecker')),...]
Package: acdh-django-geonames
A django package providing models and views for Geoname PlacesDocumentationThe full documentation is athttps://acdh-django-geonames.readthedocs.io.QuickstartInstall GeoName Places:pip install acdh-django-geonamesAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'gn_places.apps.GnPlacesConfig',...)Add GeoName Places’s URL patterns:fromgn_placesimporturlsasgn_places_urlsurlpatterns=[...url(r'^',include(gn_places_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory0.1.0 (2021-01-11)First release on PyPI.
Package: acdh-django-handle
=============================acdh-django-handle=============================.. image:: https://badge.fury.io/py/acdh-django-handle.svg:target: https://badge.fury.io/py/acdh-django-handleA django app to create and manage handle-pids_.Quickstart----------Install acdh-django-handle::pip install acdh-django-handleAdd it to your `INSTALLED_APPS`:.. code-block:: pythonINSTALLED_APPS = (...'handle',...)Provide a handle-config dict:.. code-block:: pythonHANDLE = {'resolver': "http://hdl.handle.net",'user': "your handle-provider user",'pw': "your handle-provider password",'url': "base url to your handle-provider api",'app_base_url': "the base url of your application"}example:.. code-block:: pythonHANDLE = {'resolver': "http://hdl.handle.net",'user': "user11.1234567-01",'pw': "password1234",'url': "http://pid.gwdg.de/handles/11.1234567-01/",'app_base_url': "https://myproject.com"}The value of `app_base_url` will be concaneted with the value of the `get_absolute_url` method of the model instance you want to register a handle for.And runpython manage.py migrate handleCreate/register handle-pids----The package provides a management command to bulk create/register handle-pids. For this you'll have to* add a `GenericRelation` property to the model class you would like register handles for* and make sure you have a `get_absolute_url` method defined.. code-block:: pythonfrom django.contrib.contenttypes.fields import GenericRelationfrom handle.models import Pid...class Example(models.Model):name = models.CharField(max_length=255, blank=True,)...pid = GenericRelation(Pid, blank=True, null=True, related_query_name="get_pid")...def get_absolute_url(self):return reverse('example_detail', kwargs={'pk': self.id})To register/create handle-pids run:python manage.py crate_handles exampleIn case your GenericRelation property is named something else than `pid` you need to pass in the name as second argument, e.g:python manage.py crate_handles example --pid=<name>Handle-Pids will only be crated for objects which do not have a handle-pid yet.Features--------* Provides a `Pid` class which stores* a handle-pid* creation and modification date* a generic relation to any other class of your django project.* an overidden save-method which will register/create a handle-pid on save in case you didn't provide a handle-pid* Provides a `handle.utils.create_handle` function to register/create a new handle-pid* Register/Create handle-pid for any objects in your project via admin-interface.* Provides a management command to bulk create/register handle-pids for all instances of a model-class in your project.Build and publish-----.. code-block:: consolepython setup.py sdist bdist_wheeltwine upload dist/*Credits-------Tools used in rendering this package:*  Cookiecutter_*  `cookiecutter-djangopackage`_.. _Cookiecutter: https://github.com/audreyr/cookiecutter.. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage.. _handle-pids: http://www.handle.net/History-------0.1.0 (2018-06-28)++++++++++++++++++* First release on PyPI.
Package: acdh-django-netvis
App to visualize model objects as network graphQuickstartInstall acdh-django-netvis:pip install acdh_django_netvisAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'netvis',...)Add acdh-django-netvis’s URL patterns:urlpatterns=[...url(r'^netvis/',include('netvis.urls',namespace="netvis")),...]Documentationhttps://acdh-django-netvis.readthedocs.io.FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ python manage.py testCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackageHistory2.0.0 (2021-01-29)use load static instead of load staticfiles.1.0.0 (2020-05-03)netvis-JS library does not load latest version any more.0.1.1 (2019-11-18)Included a legend.0.1.0 (2019-11-12)First release on PyPI.
Package: acdh-django-sparql
Django-App providing a query interface and proxy for any common Triplestore.QuickstartInstall acdh-django-sparql:pip install acdh-django-sparqlAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'sparql',...)Add django_sparql’s URL patterns:urlpatterns=[...url(r'^sparql/',include('sparql.urls',namespace='sparql')),...]Provide the endpoint and optional some log-in credentials for your Triplestore in some settings file:BG_URL="https://path-to-your-triple-store/sparql"BG_USER="username"BG_PW="password"browse tohttps://my-project/sparql/query/to reach the query interfaceVia the django-admin interface you can create sample queries.LicensingAll code unless otherwise noted is licensed under the terms of the MIT License (MIT). Please refer to the file LICENSE in the root directory of this repository.
Package: acdh-django-transkribus
A django app for interacting with the [Transkribus-API](https://transkribus.eu/wiki/index.php/REST_Interface) to search and read documents hosted and processed by [Transkribus](https://transkribus.eu/Transkribus/)Installationpip install acdh-django-transkribusUse:Add your user name and password and the ID of the collection you’d like to expose by the current application’s settings file like shown below:TRANSKRIBUS={"user":"mytranskribususer@whatever.com","pw":"mytranskribuspassword","col_id":"43497"}To make the faksimiles only accessible for logged in user, you need to add the following flag to your settings:For custom translations you’d need to add following dict to your settings:TRANSKRIBUS_PUBLIC=TrueTRANSKRIBUS_TRANSLATIONS={'search_form':{'prefil':'search in all documents','button':'Go!'},'search_header':{'header':'Fulltext Search'},'hits':{'facet_header':'refine your search','facet_doc_title':'Document','result_header':'Results','kwic_header':'KWIC','result_col':'Collection','result_doc':'Document','result_page':'Page','result_link':'go to document'},'page':{'img_col':'IMG','text_col':'TEXT'},'docs':{'title_col':'Title','page_nr_col':'Nr. of pages','preview_col':'Preview','doc_singular':'Document','doc_plural':'Documents','page_singular':'Page','page_plural':'Pages'}}History1.1.0 (2020-03-20)added possiblity to restrict access to non logged-in users to Facsimiles by adding TRANSKRIBUS_PUBLIC = False to settings1.0.0 (2020-03-20)load staticfiles -> load static to be Django > 3.x compatible0.3.0 (2019-10-24)more translationstranskribus-css classes added to templatesadded TrpBaseModel0.2.0 (2019-10-09)Added settings param for custom translations0.1.0 (2019-10-02)First release.
Package: acdh-django-vocabs
Curate controlled vocabularies as SKOSDocumentationThe full documentation is athttps://acdh-django-vocabs.readthedocs.io.QuickstartInstall ACDH Django Vocabs:pip install acdh-django-vocabsAdd it to yourINSTALLED_APPS:INSTALLED_APPS=(...'vocabs.apps.VocabsConfig',...)Add ACDH Django Vocabs’s URL patterns:fromvocabsimporturlsasvocabs_urlsurlpatterns=[...url(r'^',include(vocabs_urls)),...]FeaturesTODORunning TestsDoes the code actually work?source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ toxDevelopment commandspip install -r requirements_dev.txt
invoke -lCreditsTools used in rendering this package:Cookiecuttercookiecutter-djangopackagerm -rf ./dist
python setup.py sdist bdist_wheel
twine upload dist/*History0.1.0 (2021-01-05)First release on PyPI.
Package: acdh-geonames-utils
Geonames UtilsUtility functions to interact with geonames.orgFree software: MIT licenseDocumentation:https://geonames-utils.readthedocs.io/FeaturesTo use Geonames Utils in a project:from acdh_geonames_utils import acdh_geonames_utils as gn

geonames_df = gn.dwonload_to_df('AT')
geonames_df.head() # prints the first n rowsCreditsThis package was created withCookiecutterand theaudreyr/cookiecutter-pypackageproject template.History0.2.0 (2021-01-07)First release on PyPI.
Package: acdh-handle-pyutils
acdh-handle-pyutilsUtility functions to interact with handle.net APIinstallpip install acdh-handle-pyutilshow to usesee./tests/test_client.pyand also checkout the provided defaults foracdh_handle_pyutils.client.HandleClientregister handle for urlimportosfromacdh_handle_pyutils.clientimportHandleClientHANDLE_USERNAME=os.environ.get("HANDLE_USERNAME")HANDLE_PASSWORD=os.environ.get("HANDLE_PASSWORD")URL_TO_REGISTER="https://id.hansi4ever.com/123"cl=HandleClient(HANDLE_USERNAME,HANDLE_PASSWORD)result=cl.register_handle(URL_TO_REGISTER,full_url=True)print(result)# https://hdl.handle.net/21.11115/0000-000F-743B-DBe aware that it might take a while until the registerd handle resolvesupdate handleimportosfromacdh_handle_pyutils.clientimportHandleClientHANDLE_USERNAME=os.environ.get("HANDLE_USERNAME")HANDLE_PASSWORD=os.environ.get("HANDLE_PASSWORD")HANDLE_TO_UPDATE="https://hdl.handle.net/21.11115/0000-000F-743B-D"URL_TO_UPDATE="https://sumsi.com/is-the-best"cl=HandleClient(HANDLE_USERNAME,HANDLE_PASSWORD)updated=cl.update_handle(HANDLE_TO_UPDATE,URL_TO_UPDATE)print(result)print(updated.status_code)# should return for `204 No Content` HTTP response code for a successful update# 204Be aware that it might take until the handle is actually updated by the handle service provider
Package: acdh-histogis
acdh-histogis is a python package providing a high level api to interact with [HistoGIS](https://histogis.acdh.oeaw.ac.at/)Installationpip install acdh-histogisUse:fromhistogis.histogisimportHistoGisashg# by geonames (id or URL)hg().query_by_service_id(id="https://www.geonames.org/2772400/",when='1860-12-12',polygon=False)# by wikidata (id or URL)hg().query_by_service_id(id="https://www.wikidata.org/wiki/Q41329",when='1860-12-12',polygon=False)# by GND (id or URL)hg().query_by_service_id(service="gnd",id="4074255-6",when='1860-12-12',polygon=False)# returns:{'id':8118,'wikidata_id':'','name':'Linz (Stadt)','alt_name':'','source':'https://histogis.acdh.oeaw.ac.at/api/source/93/?format=json','source_name':'Cisleithania Districts 1880','administrative_unit':'https://histogis.acdh.oeaw.ac.at/api/skosconcepts/135/?format=json','adm_name':'Statutarstadt','start_date':'1850-01-01','end_date':'1918-10-31',...}LicensingAll code unless otherwise noted is licensed under the terms of the MIT License (MIT). Please refer to the file LICENSE in the root directory of this repository.History0.0.5 (2020-03-25)some modifications to dump data methods addedfunction to create singel JSONL file from single files added0.0.4 (2019-04-02)dump data methods added0.0.3 (2019-03-26)code refactoringnew methodsquery_by_service_id to fetch data by geonames, gnd and wikidata ID/URL0.0.2 (2019-03-11)fetch_geonames_rdfandquery_by_geonames_idmethods added0.0.1 (2019-03-11)First version
Package: acdh-id-reconciler
acdh-id-reconcilerpython package to reconcile GND and GeoNames IDs via WikiData.installpip install acdh-id-reconcilerusefrom GND to WikiData and GeoNames IDfromacdh_id_reconcilerimportgnd_to_geonamestest="https://d-nb.info/gnd/4010858-2"results=gnd_to_geonames(test)print(results)# {'wikidata': 'http://www.wikidata.org/entity/Q261664', 'gnd': '4010858-2', 'geonames': '2781124'}from GND to WikiDatafromacdh_id_reconcilerimportgnd_to_wikidatatest="https://d-nb.info/gnd/4074255-6"results=gnd_to_wikidata(test)print(results)# {'wikidata': 'http://www.wikidata.org/entity/Q41329', 'gnd': '4074255-6'}from GND to WikiData plus Custom-IDfromacdh_id_reconcilerimportgnd_to_wikidata_customtest="https://d-nb.info/gnd/118634712"custom="P6194"# https://www.wikidata.org/wiki/Property:P6194results=gnd_to_wikidata_custom(test,custom)print(results)# {'wikidata': 'http://www.wikidata.org/entity/Q215747', 'gnd': '118634712', 'custom': 'W/Wolf_Hugo_1860_1903'}from Geonames to WikiDatafromacdh_id_reconcilerimportgeonames_to_wikidatatest="https://www.geonames.org/2761369"results=geonames_to_wikidata(test)print(results)# {'wikidata': 'http://www.wikidata.org/entity/Q1741', 'geonames': '2761369'}from Geonames to GNDfromacdh_id_reconcilerimportgeonames_to_gndtest="https://www.geonames.org/2761369"results=geonames_to_gnd(test)print(results)# {'wikidata': 'http://www.wikidata.org/entity/Q1741', 'geonames': '2761369', 'gnd': '4066009-6'}from Wikidata to Wikipediafromacdh_id_reconcilerimportwikidata_to_wikipediatest="https://www.wikidata.org/wiki/Q1186567/"result=wikidata_to_wikipedia(test)print(result)# 'https://de.wikipedia.org/wiki/Alexandrinski-Theater'# default language is set to german, can be changed by settings param result e.g. `wiki_lang='enwiki'`result=wikidata_to_wikipedia(test,wiki_lang='enwiki')print(result)# 'https://en.wikipedia.org/wiki/Alexandrinsky_Theatre'
Package: acdh-obj2xml-pyutils
acdh-obj2xml-pyutilspython library to parse BaseRowClient of acdh-baserow-pyutils or any array of objects.HowTo developercreate python environmentpython -m venv envinstallpip install acdh_obj2xml_pyutils(not yet published)installpip install acdh_baserow_pyutils(not yet published)create python file e.g.run.pyadd codefromacdh_obj2xml_pyutilsimportObjectToXmlbr_input=[{"id":"test1","filename":"test1"},{"id":"test2","filename":"test2"}]tei=ObjectToXml(br_input=br_input)output=[xforxintei.make_xml(save=True)]print(output)with BaseRowClientfromacdh_obj2xml_pyutilsimportObjectToXmlfromacdh_baserow_pyutilsimportBaseRowClientbr_client=BaseRowClient(br_base_url="add url",br_table_id='add id',br_token='add token')br_input=[xforxinbr_client.yield_rows()]tei=ObjectToXml(br_input=br_input)output=[xforxintei.make_xml(save=True)]print(output)both versions will create an 'out' directory containing xml files. Important Note! To create filenames the data input must contain a variable with filennames. Default variable is called 'filename' but can be customized by providing an argument to class ObjectToXml().Argumentsbr_inputdata input as array of objectssave_dirdefault out as stringfilenamevariable for filenames as stringtemplate_pathpath for jinja2 template
Package: acdh-spacyal
Spacy Active learning====================.. image:: https://zenodo.org/badge/130271493.svg:target: https://zenodo.org/badge/latestdoi/130271493Django app that uses active learning (deliberately picking the examples to annotate) to retrain the spaCy_ NER module more effectively.Prerequisites-------------For spacyal to run you need a working Celery_ installation. Something along the lines of::from __future__ import absolute_import, unicode_literalsimport osfrom celery import Celeryapp = Celery('tasks')# Using a string here means the worker doesn't have to serialize# the configuration object to child processes.# - namespace='CELERY' means all celery-related configuration keys#   should have a `CELERY_` prefix.app.config_from_object('django.conf:settings', namespace='CELERY')# Load task modules from all registered Django app configs.app.autodiscover_tasks()@app.task(bind=True)def debug_task(self):print('Request: {0!r}'.format(self.request))Installation------------* Install the package* include spacyal.urls and spacyal.api_urls in your main url definition* ensure that you have a base template called base.html* run python manage.py migrate* and you should be good to go.. _Celery: http://www.celeryproject.org/.. _spaCy: https://www.spacy.io
Package: acdh-spacytei
acdh-spacytei is a python package providing utility classes and functions to processing XML (TEI, TCF) encoded documents with/for spaCyInstallationpip install acdh-spacyteiLicensingAll code unless otherwise noted is licensed under the terms of the MIT License (MIT). Please refer to the file LICENSE in the root directory of this repository.History0.0.9 (2019-02-27)added functions to process prodigy output filespipline processes access model dir0.0.6 (2019-02-27)added a tokenize method to TeiReaderNE information written as rs-tags into TEIminor things0.0.6 (2019-02-27)added langid to install_requiresnew functionrecogito.recogito_dump_to_spacy_neraddedminor things0.0.3 (2019-02-25)minor things0.0.1 (2019-02-25)First version
Package: acdh-tei-pyutils
acdh-tei-pyutilsUtilty functions to work with TEI Documentsinstallrunpip install acdh-tei-pyutilsusageparse an XML/TEI Document from and URL, string or file:fromacdh_tei_pyutils.teiimportTeiReaderdoc=TeiReader("https://raw.githubusercontent.com/acdh-oeaw/acdh-tei-pyutils/master/acdh_tei_pyutils/files/tei.xml")print(doc.tree)>>><Element{http://www.tei-c.org/ns/1.0}TEIat0x7ffb926f9c40>doc=TeiReader("./acdh_tei_pyutils/files/tei.xml")doc.tree>>><Element{http://www.tei-c.org/ns/1.0}TEIat0x7ffb926f9c40>write the current XML/TEI tree object to filedoc.tree_to_file("out.xml")>>>'out.xml'seeacdh_tei_pyutils/cli.pyfor further examplescommand line scriptsBatch process a collection of XML/Documents by adding xml:id, xml:base next and prev attributes to the documents root element run:add-attributes-g"/path/to/your/xmls/*.xml"-b"https://value/of-your/base.com"add-attributes-g"../../xml/grundbuecher/gb-data/data/editions/*.xml"-b"https://id.acdh.oeaw.ac.at/grundbuecher"Write mentions as listEvents into index-files:mentions-to-indices-t"erwähnt in "-i"/path/to/your/xmls/indices/*.xml"-f"/path/to/your/xmls/editions/*.xml"Write mentions as listEvents of index-files and copy enriched index entries into filesdenormalize-indices-f"../../xml/schnitzler/schnitzler-tagebuch-data-public/editions/*.xml"-i"../../xml/schnitzler/schnitzler-tagebuch-data-public/indices/*.xml"denormalize-indices-f"./data/*/*.xml"-i"./data/indices/*.xml"-m".//*[@key]/@key"-x".//tei:title[@level='a']/text()"denormalize-indices-f"./data/*/*.xml"-i"./data/indices/*.xml"-m".//*[@key]/@key"-x".//tei:title[@level='a']/text()"-bpmb2121-bpmb10815-bpmb50Register handle-ids and add them as tei:idno elements:add-handles-g"../../xml/grundbuecher/gb-data/data/editions/*.xml"-user"user12.3456-01"-pw"verysecret"-hixpath".//tei:publicationStmt"developinstall dev-dependencies:pip install -r requirements_dev.txtinstall local packagepip install -e .before commiting runflake8to check linting andcoverage run -m pytest -vto run the tests
Package: acdh-transkribus-utils
acdh-transkribus-utilsA python package providing some utility functions for interacting with theTranskribus-APIInstallationpip install acdh-transkribus-utilsUsageAuthenticationSet Transkribus-Credentials as environment variables:exportTRANSKRIBUS_USER=some@mail.comexportTRANSKRIBUS_PASSWORD=verysecret(or create a file calledenv.secretsimilar toenv.dummyand runsource export_env_variables.sh)
you can pass in your credentials also as params e.g.importosfromtranskribus_utils.transkribus_utilsimportACDHTranskribusUtilstr_user=os.environ.get("TRANSKRIBUS_USER")tr_pw=os.environ.get("TRANSKRIBUS_PASSWORD")client=ACDHTranskribusUtils(user=tr_user,password=tr_pw)List all collectionscollections=client.list_collections()forxincollections[-7:]:print(x["colId"],x["colName"])# 188933 bv-play# 188991 Kasten_blau_45_11# 190357 acdh-transkribus-utils# 193145 palm# 195363 Österreichische Bundesverfassung: Datenset A# 196428 Österreichische Bundesverfassung: Datenset B# 196429 Österreichische Bundesverfassung: Datenset CList all documents from a given collectioncol_id=142911documents=client.list_docs(col_id)n=-3forxindocuments[n:]:print(x["docId"],x["title"],x["author"],x["nrOfPages"])# 950920 Kasten_blau_44_9_0050 Pfalz-Neuburg, Eleonore Magdalena Theresia von 1# 950921 Kasten_blau_44_9_0037 Pfalz, Johann Wilhelm Joseph Janaz von der 4# 950922 Kasten_blau_44_9_0239 Pfalz, Johann Wilhelm Joseph Janaz von der 1Download METS files from Collectionfromtranskribus_utils.transkribus_utilsimportACDHTranskribusUtilsCOL_ID=51052client=ACDHTranskribusUtils()client.collection_to_mets(COL_ID)# downloads a METS for each document in the given collection into a folder `./{COL_ID}client.collection_to_mets(COL_ID,file_path='./foo')# downloads a METS for each document in the given collection into a folder `./foo/{COL_ID}client.collection_to_mets(COL_ID,filter_by_doc_ids=[230161,230155])# downloads only METS for document with ID 230161 and 230155 into a folder `./{COL_ID}
Package: acdh-uri-norm-rules
UriNormRulesSet of URI normalization rules used within theACDH-CD.Provides Python 3 and PHP bindings.Rules are stored as a JSON in theUriNormRules/rules.jsonfile.Installation & usagePythonInstall using pip3:pip3installacdh_uri-norm-rulesUse withfromAcdhUriNormRulesimportget_rules,get_normalized_uriprint(AcdhUriNormRules.get_rules())wrong_id="http://sws.geonames.org/1232324343/linz.html"good_id=get_normalized_uri(wrong_id)print(good_id)# "https://www.geonames.org/1232324343"PHPInstall using usingcomposer:composerrequireacdh-oeaw/uri-norm-rulesUsage withrequire_once 'vendor/autoload.php';print_r(acdhOeaw\UriNormRules::getRules());
Package: acdh-wikidata-pyutils
acdh-wikidata-pyutilsUtility package to fetch data from Wikidatadevelopmentcreate virtual envpython -m venv venvand activate itsource venv/bin/activateinstall dev-dependenciespip install -r requirements_dev.txtinstall acdh-wikidata-pyutils locallypip install -e .run testscoverage run -m pytestusagefromacdh_wikidata_pyutilsimportWikiDataPersonitem=WikiDataPerson("https://www.wikidata.org/wiki/Q44331")person=item.get_apis_entity()print(person)# {'name': 'Schnitzler', 'first_name': 'Arthur', 'start_date_written': '1862-05-15', 'end_date_written': '1931-10-21', 'gender': 'male'}fromacdh_wikidata_pyutilsimportWikiDataPlaceitem=WikiDataPlace("https://www.wikidata.org/wiki/Q41329")place=item.get_apis_entity()print(place)# {'name': 'Linz', 'lat': 48.30583333333333, 'long': 14.286388888888888}
Package: acdpnet
Network Core一个能够用简洁的方式来构建通信服务的轻量级框架。方法此项目已上传acdpnet · PyPI，快速安装可使用以下命令。pipinstallacdpnet-ihttps://pypi.org/simple构建服务基本框架fromacdpnetimportservicesapp=services.Tree()# extensionapp.run(('0.0.0.0',1035),token='ASDF')通过以上代码可以快速构建一个服务端，但仍然无法投入使用，在此之上还需要加上用户认证的功能。用户认证简单的用户创建方式app.idf.acessuid={'Name':'Password'}自定义用户认证classLogin(services.Idenfaction):defsetup(self):passdefIdenfy(self,account:str,key:str):ifkey==self.acessuid.get(account):returnTrueelse:returnFalseapp.idf=Login()在继承services.Idenfaction后，认证的方式请写在Idenfy方法中。之后覆盖app.idf。服务拓展完成了基本的框架后，就可以为服务端添加功能啦。通过函数拓展fromacdpnet.toolsimportConet# 引用此类是为了在写代码时出现代码提示，可不引用@app.command('command_name')defDosomething(conet:Conet):pass通过类拓展fromacdpnet.toolsimportConetclassServ:defcommand_name_1(conet:Conet):passdefcommand_name_2(conet:Conet):passapp.extension(Serv)在通过此方法拓展时，请勿在方法中添加self，同时方法的名称便是指令的名称。通过内置拓展添加此库中内置了一些预先写好的拓展，可以通过以下方式添加。fromacdpnet.extensionimporttransferapp.extension(transfer.Transfer)构建客户端基本方式fromacdpnetimportnodesapp=nodes.BasicNode('Name','Password')app.connect(('localhost',1035),token='ASDF')# do somethingapp.close()发送与接收发送命令及数据data={...}app.send('Your command',data)接收命令与数据resp=app.recv()# 由服务端决定返回 dict 或 list