Package: pyepp
PyEPPA Python API on top of EPP protocol to work with registry systems.This a Python API onEPPprotocol to connect to
any registry systems that support EPP and work with it. It supports bellow RFCs:RFC 5730 - Extensible Provisioning ProtocolRFC 5731 - Domain Name MappingRFC 5732 - Host MappingRFC 5733 - Contact MappingRFC 5734 - Transport over TCPThis is an early version and not stable yet. Please use with care.InstallationpipinstallpyeppUsage examplefromdatetimeimportdatefrompyeppimportEppCommunicatorfrompyepp.domainimportDomain,DomainData,DSRecordData,DNSSECAlgorithm,DigestTypeEnumfrompyepp.contactimportContact,ContactData,PostalInfoData,AddressDataconfig={"host":"epp.test.net.nz","port":"700","client_cert":"/PATH/TO/YOUR/CLIENT_CERTIFICATE.crt","client_key":"/PATH/TO/YOUR/CLIENT_KEY.pem"}epp=EppCommunicator(**config)connect=epp.connect()login=epp.login("user_name","password")# Sends a hello request and receive greeting in respondhello=epp.hello()contact=Contact(epp)# Check contacts availabilitycontact_check=contact.check(['contact-1','contact-2'])# Create a new contactcontact_create_params=ContactData(id='contact-1',email='epp@example.net.nz',postal_info=PostalInfoData(name='Registrar 1',organization='Registrar 1',address=AddressData(street_1='18 Registrar Street',street_2='Registrar CBD',city='Registrar',country_code='NZ',province='Registrar',postal_code='6011'),),phone='+64.111111111')contact_create=contact.create(contact_create_params)# Get contact detailscontact_info=contact.info('contact-1')domain=Domain(epp)# Check domains availabilitydomain_check=domain.check(['domain1.nz','domain2.nz'])# Create a new domain namedomain_create_params=DomainData(domain_name='example.nz',registrant='contact-1',admin='contact-1',tech='contact-1',billing='contact-3',period=3,host=['01y.test-indwrx2vkicn2otgm3otav5wpnzvjd.co.nz','0d9x6239.example.co.nz'],dns_sec=DSRecordData(key_tag=1235,algorithm=DNSSECAlgorithm.DSA_SHA_1.value,digest_type=DigestTypeEnum.SHA_1.value,digest='8cdb09364147aed879d12c68d615f98af5900b73'),)domain_create=domain.create(domain_create_params)# Renew a domain namerenew_domain=domain.renew(domain_name='example-1.nz',expiry_date=date(2024,2,23),period=2)PyEPP CLIPyEPP also has a command line interface that allows the user to interact with the registry system.Usage: pyepp [OPTIONS] COMMAND [ARGS]...

  A command line interface to work with PyEpp library.

Options:
  --host TEXT                     [required]
  --port TEXT                     [required]
  --client-cert TEXT              [required]
  --client-key TEXT               [required]
  --user TEXT                     [required]
  --password TEXT                 [required]
  -o, --output-format [XML|OBJECT|MIN]
                                  [default: XML]
  --no-pretty
  --dry-run
  -f, --file FILENAME             If provided, the output will be written in
                                  the file.
  -v, --verbose
  -d, --debug
  --version                       Show the version and exit.
  -h, --help                      Show this message and exit.

Commands:
  contact  To work with Contact objects in the registry.
  domain   To work with Domain name objects in the registry.
  host     To work with Host objects in the registry.
  poll     To manage registry service messages.
  run      Receive an XML file containing an EPP XML command and execute it.Development setupClone this project. It's recommended to create virtual environment. Then install the dependencies and
development dependencies:pipinstall-rrequirements.txt
pipinstall-rrequirements.dev.txtBefore creating any pull requests please make sure your code lints and there is no security issues in your code
by running below scripts:./scripts/linter.sh
./scripts/code-security-check.shHappy developing!ContributingPlease refer toCONTRIBUTING.md