brand


Namebrand JSON
Version 0.0.6 PyPI version JSON
download
home_pagehttps://github.com/thorwhalen/brand
SummaryFinding available domain names
upload_time2023-01-04 08:04:02
maintainer
docs_urlNone
authorThor Whalen
requires_python
licenseapache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # brand
Finding available domain names

To install:	```pip install brand```

# How to use

## Example script

`search_names.py` shows an example of how to assemble 
`brand` functionalities to write a script that will search
names of the form `CVCVCV` (`C` for consonant, `V` for vowel)
with no more than `4` unique letters and where either the 
consonants or the vowels are all the same.

```
...
(10)12:49:07 - 2255: nesebe
(10)12:49:08 - 2256: nesede
(10)12:49:09 - 2257: nesefe
---> Found available name: nesefe
(10)12:49:09 - 2258: nesege
---> Found available name: nesege
(10)12:49:09 - 2259: nesele
---> Found available name: nesele
(10)12:49:11 - 2260: neseme
---> Found available name: neseme
(10)12:49:11 - 2261: nesene
```

## The functions available to you

## name_is_available

`name_is_available` checks if a name is available using the system's
`whois` command.

```python
from brand import name_is_available
assert name_is_available('google.com') is False
assert name_is_available('asdfaksdjhfsd2384udifyiwue.org') is True
```

### The store

First, you'll need to provide a "store". 
That is, a dict-like object that will hold the names you've checked so far, 
under keys `available_names.p` and `not_available.p` (which contains the names
that were checked, but not available). 

The functions use this both to not check what you've already checked, 
and to store its results as they check names.

A store can be an actual `dict`, or a dict-like interface to files or a DB.

We advise to use `py2store` (which is installed with `brand`) to make dict-like
interfaces to your storage system of choice.

When you ask `brand` to make a store with no further specifications, 
it makes a directory and places files in there for you.

```python
import brand
s = brand.get_store()
```

Now you can use that store to see what's already available from 
past work (if anything).

```python
available = brand.available_names(s)
not_available = brand.not_available_names(s)
len(available), len(not_available)
```

### process_names

`process_names` will take some `names` (specified as an iterable, 
generator function, or pickle file) and check if each is available, 
saving the results in the given store.

```python
try_these = ['google.com', 'gaggle.com', 'giggle.org', 'asdfiou3t.org']
process_names(try_these)
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thorwhalen/brand",
    "name": "brand",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "",
    "author": "Thor Whalen",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/48/eb/272bb494e1361b83f68fb232782400e1068e5a84c5c3ab3d5613425ae3a3/brand-0.0.6.tar.gz",
    "platform": "any",
    "description": "# brand\nFinding available domain names\n\nTo install:\t```pip install brand```\n\n# How to use\n\n## Example script\n\n`search_names.py` shows an example of how to assemble \n`brand` functionalities to write a script that will search\nnames of the form `CVCVCV` (`C` for consonant, `V` for vowel)\nwith no more than `4` unique letters and where either the \nconsonants or the vowels are all the same.\n\n```\n...\n(10)12:49:07 - 2255: nesebe\n(10)12:49:08 - 2256: nesede\n(10)12:49:09 - 2257: nesefe\n---> Found available name: nesefe\n(10)12:49:09 - 2258: nesege\n---> Found available name: nesege\n(10)12:49:09 - 2259: nesele\n---> Found available name: nesele\n(10)12:49:11 - 2260: neseme\n---> Found available name: neseme\n(10)12:49:11 - 2261: nesene\n```\n\n## The functions available to you\n\n## name_is_available\n\n`name_is_available` checks if a name is available using the system's\n`whois` command.\n\n```python\nfrom brand import name_is_available\nassert name_is_available('google.com') is False\nassert name_is_available('asdfaksdjhfsd2384udifyiwue.org') is True\n```\n\n### The store\n\nFirst, you'll need to provide a \"store\". \nThat is, a dict-like object that will hold the names you've checked so far, \nunder keys `available_names.p` and `not_available.p` (which contains the names\nthat were checked, but not available). \n\nThe functions use this both to not check what you've already checked, \nand to store its results as they check names.\n\nA store can be an actual `dict`, or a dict-like interface to files or a DB.\n\nWe advise to use `py2store` (which is installed with `brand`) to make dict-like\ninterfaces to your storage system of choice.\n\nWhen you ask `brand` to make a store with no further specifications, \nit makes a directory and places files in there for you.\n\n```python\nimport brand\ns = brand.get_store()\n```\n\nNow you can use that store to see what's already available from \npast work (if anything).\n\n```python\navailable = brand.available_names(s)\nnot_available = brand.not_available_names(s)\nlen(available), len(not_available)\n```\n\n### process_names\n\n`process_names` will take some `names` (specified as an iterable, \ngenerator function, or pickle file) and check if each is available, \nsaving the results in the given store.\n\n```python\ntry_these = ['google.com', 'gaggle.com', 'giggle.org', 'asdfiou3t.org']\nprocess_names(try_these)\n```\n",
    "bugtrack_url": null,
    "license": "apache-2.0",
    "summary": "Finding available domain names",
    "version": "0.0.6",
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "e33f9dd4f849ad27b1782cbc184db25815faeb822d4ce8b58c75477f094e8a63",
                "md5": "2eec37b7ff35dd01283ddc56572bc25f",
                "sha256": "fbde4fe9c7d7b60fac4359d51d7f2ffba5475349244a0bdb4f61c511e476affe"
            },
            "downloads": -1,
            "filename": "brand-0.0.6-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2eec37b7ff35dd01283ddc56572bc25f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 9776,
            "upload_time": "2023-01-04T08:04:00",
            "upload_time_iso_8601": "2023-01-04T08:04:00.551791Z",
            "url": "https://files.pythonhosted.org/packages/e3/3f/9dd4f849ad27b1782cbc184db25815faeb822d4ce8b58c75477f094e8a63/brand-0.0.6-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "48eb272bb494e1361b83f68fb232782400e1068e5a84c5c3ab3d5613425ae3a3",
                "md5": "2bbb7f6ad8a0149da5cf8c1028a51107",
                "sha256": "365c24d2d0528cd453f3057a6af8f5e47e3d512b35f7af7558d862bc88f22a36"
            },
            "downloads": -1,
            "filename": "brand-0.0.6.tar.gz",
            "has_sig": false,
            "md5_digest": "2bbb7f6ad8a0149da5cf8c1028a51107",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 8863,
            "upload_time": "2023-01-04T08:04:02",
            "upload_time_iso_8601": "2023-01-04T08:04:02.292662Z",
            "url": "https://files.pythonhosted.org/packages/48/eb/272bb494e1361b83f68fb232782400e1068e5a84c5c3ab3d5613425ae3a3/brand-0.0.6.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-01-04 08:04:02",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "thorwhalen",
    "github_project": "brand",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "brand"
}
        
Elapsed time: 0.08317s