Skip to main content

Check domain name availability via CLI. Supports patterns for checking in batches.

Project description

domainname

This package allows to quickly initialise new Python package using bleeding edge tools like linters, just run:

  • pip install domainname
  • domainname <your-package-name>

Now you are able to:

  • cd <your-package-name>
  • make check # To run tests and linters
  • make publish # To publish your new package to PyPi.org to make it accessable to everyone

Development

Commonly used commands for package development:

  • make check - run unit tests and linters.
  • make fix - format code and fix detected fixable issues.
  • make publish - publishes current package version to pypi.org.
  • make compile - bump and freeze dependency versions in requirements*.txt files
  • make sync - upgrade installed dependencies in Virtual Environment (executed after make compile)

Toolset

This package uses these cutting edge tools:

  • ruff - for linting and code formatting
  • mypy - for type checking
  • pip-audit - for known vulnerability detection in dependencies
  • deadcode - for unused code detection
  • pytest - for collecting and running unit tests
  • coverage - for code coverage by unit tests
  • hatch - for publishing package to pypi.org
  • uv - for Python virtual environment and dependency management
  • pyproject.toml - configuration file for all tools
  • Makefile - aliases for commonly used command line commands

Feature requests:

  • Newly installed package could have virtualenv initialised.

  • Check if git is available before trying to initialise the repository.

  • remove init Makefile alias and cli.py command python files.

  • make a cli command: this package should be installable. Ideally this flow should work:

    • pip install domainname
    • domainname mynewpackage
    • cd mynewpackage && make check && make publish
  • Add pre-commit hooks with all the tools enabled.

  • codspeed.io could be considered for Continuous integration pipeline

  • Provide Python version for domainname CLI command.

  • Add domainname abreviation CLI alias not to type so much

  • make compile and make sync does not work when virtual environment is activated

  • enable async test execution by default:

    • "pytest-asyncio", [tool.pytest.ini_options] addopts = "--cov=. --no-cov-on-fail --cov-fail-under=90.0" +asyncio_mode = "auto"
  • Clean up the /main.py file after initialization: that logic is overwhelming.

  • Clean up README and descriptions in pyproject.toml and /init.py.

  • Package should display proper messages when internet connection or git is not available. Now it crashes without internet connection with this Traceback:

Cloning domainname files to /home/niekas/tools/gitruff
Cloning into '/home/niekas/tools/gitruff'...
fatal: unable to access 'https://github.com/albertas/domainname/': Could not resolve host: github.com
Traceback (most recent call last):
  File "/home/niekas/venv/bin/domainname", line 8, in <module>
    sys.exit(main())
             ^^^^^^
  File "/home/niekas/venv/lib/python3.12/site-packages/domainname/main.py", line 40, in main
    init_new_package(package_name=parsed_args.package_name)
  File "/home/niekas/venv/lib/python3.12/site-packages/domainname/main.py", line 26, in init_new_package
    pipe = Popen(["make", "init", package_name], stdin=PIPE, stdout=PIPE, cwd=new_package_path)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.12/subprocess.py", line 1026, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.12/subprocess.py", line 1955, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: '/home/niekas/tools/gitruff'
  • --django --fastapi or other options to add some kind of dependencies and initial project stub to get started with those projects easily.
  • Should create package tags during publishing. Each version should a commit tagged in main branch.

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

domainname-0.0.1.tar.gz (5.1 kB view details)

Uploaded Source

Built Distribution

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

domainname-0.0.1-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file domainname-0.0.1.tar.gz.

File metadata

  • Download URL: domainname-0.0.1.tar.gz
  • Upload date:
  • Size: 5.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for domainname-0.0.1.tar.gz
Algorithm Hash digest
SHA256 1042e811a5ac7fe9bda559302bc93b9b0ac63daa437d55e1ad06f7ff9b0c8e80
MD5 9be85a600c8fe2bb22d876f5bec8be3d
BLAKE2b-256 c3ecc3edf8aeb9298478174fe81f721dadd395a00c48cc79954d4d6cc994e8b3

See more details on using hashes here.

File details

Details for the file domainname-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: domainname-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.27.2

File hashes

Hashes for domainname-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 304fdde3be0b812fb69efdf612aa6db3af197fb8eb4c23a72b2d60ea6604d6c6
MD5 24e4333f60d1b0e7c6a305d052b3e845
BLAKE2b-256 0f4c9ea483b7eaa9d1d001457e864311cfec6e85405184e76863446ac4fb3667

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