Skip to main content

Get some basic data about domains from a server with plesk panel

Project description

py-plesk-domains

A python script to get some basic data about domains from a server with plesk panel. Except from the data that plesk's api returns (id, domain, created datetime, type, status), the script also returns the domain's current ip, certificate expiration and issuer.

Installation

It's recommended to use Python 3.7 or newer.

pip install git+https://github.com/takisrs/py-plesk-domains.git

Docker

Alternatively, you may quick run it through docker...

  1. By cloning this repo and using the provided docker-dompose.yml file:
    ex.
    docker-compose run --rm py-plesk-domains server-hostname.com -u admin -o ./ -p

  2. Or by pulling and running the image that has been uploaded in the docker hub:
    ex.
    docker container run -it --rm -v ${PWD}:/app takisrs/py-plesk-domains server-hostname.com -u admin -o ./ -p

Instructions

panos@panos-linux:~$ py-plesk-domains -h
usage: py-plesk-domains [-h] -u USERNAME -p [PASSWORD] [-s {name,created,type,status,ip,expiry_date,issuer}] [-f {plain,simple,github,grid,fancy_grid,pipe,orgtbl,jira,presto,pretty,psql,rst,mediawiki,moinmoin,youtrack,html,latex,latex_raw,latex_booktabs,textile}]
                        [-o CSVPATH]
                        host

Returns the domains from a server with plesk panel with some extra info for each domain (current domain's ip address, certificate expiration date, certificate issuer).

positional arguments:
  host                  server hostname or ip address

optional arguments:
  -h, --help            show this help message and exit
  -u USERNAME           Plesk administrator username
  -p [PASSWORD]         Plesk administrator password
  -s {name,created,type,status,ip,expiry_date,issuer}
                        Select a sorting option. Default: created
  -f {plain,simple,github,grid,fancy_grid,pipe,orgtbl,jira,presto,pretty,psql,rst,mediawiki,moinmoin,youtrack,html,latex,latex_raw,latex_booktabs,textile}
                        Select a formatting option for the table. Default: pretty
  -o CSVPATH            Optionally, Provide a path to export the data in a csv file

Example command:
py-plesk-domains server-hostname.com -u admin -s expiry_date -f rst -o ~/domains/ -p

Demo

demo output

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py-plesk-domains-1.1.1.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_plesk_domains-1.1.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file py-plesk-domains-1.1.1.tar.gz.

File metadata

  • Download URL: py-plesk-domains-1.1.1.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for py-plesk-domains-1.1.1.tar.gz
Algorithm Hash digest
SHA256 2d910b3ce46a4cb453d1dc570c7f6baa9d1f3c3e1540aef8c27b22a619f49f41
MD5 98da9251f9f5b66ee346cb0b405c0e8e
BLAKE2b-256 25556ff23801ee990b702f2ef7a155adbb506b48a7bce52993607f311d07ddaf

See more details on using hashes here.

File details

Details for the file py_plesk_domains-1.1.1-py3-none-any.whl.

File metadata

  • Download URL: py_plesk_domains-1.1.1-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.8.7

File hashes

Hashes for py_plesk_domains-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8e14ac6882262ac6618c9a4f9ce733ed13d84ea9bcb7d28b362c2ca9551e9ede
MD5 32d9b2e66824b576c2f65611ab60d774
BLAKE2b-256 2d58bec5e14a73e1622ca05da4759e086fa39c73220f58f07530fa54bf7f260c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page