{ "info": { "author": "Floyd Hightower", "author_email": "", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "===============================\nonemillion\n===============================\n\n.. image:: https://img.shields.io/pypi/v/onemillion.svg\n :target: https://pypi.python.org/pypi/onemillion\n\n.. image:: https://img.shields.io/travis/fhightower/onemillion.svg\n :target: https://travis-ci.org/fhightower/onemillion\n\n.. image:: https://codecov.io/gh/fhightower/onemillion/branch/master/graph/badge.svg\n :target: https://codecov.io/gh/fhightower/onemillion\n \n.. image:: https://api.codacy.com/project/badge/Grade/e47d712af7e24ac493e76392d1613e82\n :alt: Codacy Badge\n :target: https://www.codacy.com/app/fhightower/onemillion\n\n.. image:: https://readthedocs.org/projects/onemillion/badge/?version=latest\n :target: https://onemillion.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://pyup.io/repos/github/fhightower/onemillion/shield.svg\n :target: https://pyup.io/repos/github/fhightower/onemillion/\n :alt: Updates\n\nDetermine if a domain is in the Alexa or Cisco top one million domain list.\n\nDocumentation is available here: `https://onemillion.readthedocs.io `_ .\n\nInstallation\n============\n\nThe recommended means of installation is using `pip `_:\n\n``pip install onemillion``\n\nAlternatively, you can install onemillion as follows:\n\n.. code-block:: shell\n\n git clone https://github.com/fhightower/onemillion.git && cd onemillion;\n python setup.py install --user;\n\nUsage\n=====\n\nWhen using the default settings, the following steps will be taken when an instance of onemillion is initialized and the ``domain_in_million`` function called:\n\n1. Check to see if the domain lists have been updated today.\n\n2a. If they have been updated today, look for the given domain in the lists and stop.\n\n2b. If the lists have not been updated today, make a ``HEAD`` request and check the current etag against the previous etag (stored locally) to see if the lists have been updated.\n\n3a. If the etags are the same (meaning the lists have not been updated), look for the given domain in the lists and stop.\n\n3b. If the etags are different (meaning the lists have been updated), make a request for the lists, unzip them, and save them in the default cache location (``~/.onemillion``).\n\n4. Now that the lists are updated, search for the given domain in the lists.\n\nDefault Usage ~ Hello World!\n----------------------------\n\nVia Python\n^^^^^^^^^^\n\nThe default usage of onemillion is as follows:\n\n.. code-block:: python\n\n import onemillion\n\n o = onemillion.OneMillion()\n o.domain_in_million(\"google.com\") # 1\n o.domain_in_million(\"gaagle.com\") # None\n\nUsing the method described above, the alexa and cisco top one million domain lists as well as a bit of metadata will be stored in the home directory: ``~/.onemillion``.\n\nVia Command Line\n^^^^^^^^^^^^^^^^\n\nThe default usage of onemillion via command line is as follows:\n\n.. code-block:: shell\n\n onemillion google.com\n\nAs as when using onemillion in a python script, the alexa and cisco top one million domain lists as well as a bit of metadata will be stored in the home directory: ``~/.onemillion``.\n\nNo Caching\n----------\n\nVia Python\n^^^^^^^^^^\n\nIf you do not want to cache the domain lists, you can tell onemillion not cache anything by setting ``cache=False`` on initialization as demonstrated below:\n\n.. code-block:: python\n\n import onemillion\n\n # do not cache anything\n o = onemillion.OneMillion(cache=False)\n o.domain_in_million(\"google.com\") # 1\n o.domain_in_million(\"gaagle.com\") # None\n\nThe code described above is fine if you are only making one or two calls or if storage space is a concern, but it is suggested that you cache the lists if feasible so as to limit traffic to the domain lists.\n\n**NOTE:** currently, the 'No caching' configuration will throw an error. This will be updated and handled when `issue #12 `_ is fixed.\n\nVia Command Line\n^^^^^^^^^^^^^^^^\n\nVia command line, same principle as above:\n\n.. code-block:: shell\n\n onemillion google.com --no-cache\n\nCustom Cache Location\n---------------------\n\nVia Python\n^^^^^^^^^^\n\nIf you are caching the lists but want to cache them somewhere other than your home directory, you can specify a custom cache location by setting the ``cache_location`` parameter when initializing onemillion as demonstrated below:\n\n.. code-block:: python\n\n import onemillion\n\n # cache data to a specific path\n o = onemillion.OneMillion(cache_location=)\n o.domain_in_million(\"google.com\") # 1\n o.domain_in_million(\"gaagle.com\") # None\n\nThis will cache the domain lists in the path you provide.\n\nVia Command Line\n^^^^^^^^^^^^^^^^\nVia command line, same principle as above:\n\n.. code-block:: shell\n\n onemillion google.com --cache_location ~/.cache/onemillion/\n\nor\n\n.. code-block:: shell\n\n onemillion google.com -l ~/.cache/onemillion/\n\nNo Update\n---------\n\nVia Python\n^^^^^^^^^^\n\nIf you have already run onemillion and have the domain lists cached, but do not want to keep updating them, you can specify ``update=False`` on initialization as demonstrated below:\n\n.. code-block:: python\n\n import onemillion\n\n # do not update cached content\n o = onemillion.OneMillion(update=False)\n o.domain_in_million(\"google.com\") # 1\n o.domain_in_million(\"gaagle.com\") # None\n\nBe aware that onemillion will, by default, check to see if it has already updated the domain lists today before making any requests. Thus, onemillion handles updating responsibly and intelligently by default and there are few cases in which this configuration (using ``update=False``) is necessary. Nevertheless... it's there and you are welcome to use it.\n\nVia Command Line\n^^^^^^^^^^^^^^^^\n\nVia command line, same principle as above:\n\n.. code-block:: shell\n\n onemillion google.com --no-update\n\nCredits\n=======\n\nThis package was created with Cookiecutter_ and the `fhightower/python-project-template`_.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`fhightower/python-project-template`: https://github.com/fhightower/python-project-template\n\n\n=======\nHistory\n=======\n\n0.5.0 (2017-08-12)\n------------------\n\n* Adding command line capability\n\n0.4.5 (2017-05-09)\n------------------\n\n* Returning rank of the given host rather than just a boolean\n* Adding (better) codecoverage when testing\n\n0.4.1 (2017-04-25)\n------------------\n\n* Improving comments and documentation\n* Separating the list updating from the domain check\n\n0.4.0 (2017-04-12)\n------------------\n\n* Improved testing\n\n0.1.0 (2017-04-04)\n------------------\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/fhightower/onemillion", "keywords": "onemillion", "license": "MIT license", "maintainer": "", "maintainer_email": "", "name": "onemillion", "package_url": "https://pypi.org/project/onemillion/", "platform": "", "project_url": "https://pypi.org/project/onemillion/", "project_urls": { "Homepage": "https://github.com/fhightower/onemillion" }, "release_url": "https://pypi.org/project/onemillion/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "Determine if a domain is in the Alexa or Cisco top one million domain list.", "version": "1.0.0" }, "last_serial": 4918794, "releases": { "0.2.0": [], "0.3.0": [ { "comment_text": "", "digests": { "md5": "292e15e55421dd405bb0b5d55ab5d9f5", "sha256": "04bc9feea58fdf6ecd06168102e40e998e94dc8135c5db7ab4dcafe7b4a49ecb" }, "downloads": -1, "filename": "onemillion-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "292e15e55421dd405bb0b5d55ab5d9f5", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6059, "upload_time": "2017-04-08T10:11:39", "url": "https://files.pythonhosted.org/packages/e1/ef/d435f9443169e48101c74349e981e70ce6e03d55c25b177fbc0a48ddf94b/onemillion-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5411e497fa794b94fd54f42a7734a104", "sha256": "f14e85b2891d40009ac77e3cced1aa9e6b45889eecbc043ed5cc1ade839551d6" }, "downloads": -1, "filename": "onemillion-0.3.0.tar.gz", "has_sig": false, "md5_digest": "5411e497fa794b94fd54f42a7734a104", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13186, "upload_time": "2017-04-08T10:11:41", "url": "https://files.pythonhosted.org/packages/18/b9/d82212f31278e40d0aa91b3bdbfaaa37cb75efade4efd2933e2f06416a16/onemillion-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "bd552db66049c5522eb32a18e5c23b6f", "sha256": "51c2ca0b41471c2d5ffb17b4e1ef5cc5b41b9bd128648d029bd80b98c2928ede" }, "downloads": -1, "filename": "onemillion-0.3.1-py2.7.egg", "has_sig": false, "md5_digest": "bd552db66049c5522eb32a18e5c23b6f", "packagetype": "bdist_egg", "python_version": "2.7", "requires_python": null, "size": 8307, "upload_time": "2017-04-08T20:02:34", "url": "https://files.pythonhosted.org/packages/e7/62/d69196b7df88e68456a5fc2972e0c601018c4d1d42846f7def225fd659ae/onemillion-0.3.1-py2.7.egg" }, { "comment_text": "", "digests": { "md5": "60cb2020586761f4de8cc56f9ca06d08", "sha256": "70b9a1833f502bf8b03f31ef3dcb7534da4b2cf30a17da6d041063c59410f95a" }, "downloads": -1, "filename": "onemillion-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "60cb2020586761f4de8cc56f9ca06d08", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6276, "upload_time": "2017-04-08T20:02:32", "url": "https://files.pythonhosted.org/packages/ef/d1/2d06b972935686518dee63e4929434d8b713131dbec3a382077b0b178390/onemillion-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c8c661fbfd4f5e2d02583a99f4688b0a", "sha256": "601a034f4c6b1697ae42cfa16e9fbc3440267b8839a2d2a7724d677508827b93" }, "downloads": -1, "filename": "onemillion-0.3.1.tar.gz", "has_sig": false, "md5_digest": "c8c661fbfd4f5e2d02583a99f4688b0a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13316, "upload_time": "2017-04-08T20:02:35", "url": "https://files.pythonhosted.org/packages/e1/6c/bbb3167f06aaa9c5f00a8e33dea410c659c4ae5c12695e0f87616a062ffd/onemillion-0.3.1.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "89bab03a1b2ea3ff95f45593a182a53d", "sha256": "8acf017ba68ae89f6f70e97cb6117fb838c3281945b0a301f6ec9a2ba8c31c39" }, "downloads": -1, "filename": "onemillion-0.4.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "89bab03a1b2ea3ff95f45593a182a53d", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 6349, "upload_time": "2017-04-12T10:33:55", "url": "https://files.pythonhosted.org/packages/e6/85/5596698c866d864a898c4b91cde020e9577ac998cc0cf8dd496174b41f67/onemillion-0.4.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "fbd56226bacd76b49e51aab2ad600c07", "sha256": "bd12c9e72373fe92be975ac7a3e6fdeb4ab586a3e9903b343e7b034bda87b906" }, "downloads": -1, "filename": "onemillion-0.4.0.tar.gz", "has_sig": false, "md5_digest": "fbd56226bacd76b49e51aab2ad600c07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13373, "upload_time": "2017-04-12T10:33:56", "url": "https://files.pythonhosted.org/packages/63/00/ebb7c592eabfb81574525b69a0486573dfd8838bbd7d277b69e2ce845fc3/onemillion-0.4.0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "3c8ff1ba9fa01e6d678ebc78778e9512", "sha256": "5da94af3c26e79c98fbe798d0c49e04735d32fc857af3153b8c733ca67cc41ad" }, "downloads": -1, "filename": "onemillion-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "3c8ff1ba9fa01e6d678ebc78778e9512", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8499, "upload_time": "2017-04-25T15:07:31", "url": "https://files.pythonhosted.org/packages/d4/bb/e2f199f1797e0a4b62d5b80ce8ace9a86b40efe0be37999122c4f1ab9bb1/onemillion-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "08f571fd3b472650dba1a03c25d80863", "sha256": "001e5bcacc08eebd9bd2a3e0153146f866da4fd7777aa712d4f1e8cfe0419220" }, "downloads": -1, "filename": "onemillion-0.4.1.tar.gz", "has_sig": false, "md5_digest": "08f571fd3b472650dba1a03c25d80863", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15019, "upload_time": "2017-04-25T15:07:32", "url": "https://files.pythonhosted.org/packages/26/68/70208e331b6ec3f66fca735a7d0faafb0997817328aa8fb73a591863d69d/onemillion-0.4.1.tar.gz" } ], "0.4.5": [ { "comment_text": "", "digests": { "md5": "dd6fb04da13e51c3b3688d1c19432bc0", "sha256": "618a289dff6c6a4a52cb88d69b87df39354bba777b6daa75bc08f26de1c23e6e" }, "downloads": -1, "filename": "onemillion-0.4.5.tar.gz", "has_sig": false, "md5_digest": "dd6fb04da13e51c3b3688d1c19432bc0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15098, "upload_time": "2017-05-09T09:47:49", "url": "https://files.pythonhosted.org/packages/bb/ca/86a360c45b0a71e5a9a112f3daeeab1b2e77eb050f74e108827b90343da8/onemillion-0.4.5.tar.gz" } ], "0.5.0": [ { "comment_text": "", "digests": { "md5": "933c01959d75c82845d68dd3a3f580b0", "sha256": "010ed425c7298153d6302576f870000bda071a718de321c6bed37d30d2a04c0e" }, "downloads": -1, "filename": "onemillion-0.5.0.tar.gz", "has_sig": false, "md5_digest": "933c01959d75c82845d68dd3a3f580b0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15754, "upload_time": "2017-08-12T18:28:39", "url": "https://files.pythonhosted.org/packages/33/7c/c23595d685976d7579d7cc1a7f1699941c4f060473615a14f19f041e0b7e/onemillion-0.5.0.tar.gz" } ], "0.5.1": [ { "comment_text": "", "digests": { "md5": "640619f3e41e23a4871fab4acc3118cd", "sha256": "91ee85cf8d535fe68724a24803a95779d736b3c435b055ccde27de8d115603b1" }, "downloads": -1, "filename": "onemillion-0.5.1.tar.gz", "has_sig": false, "md5_digest": "640619f3e41e23a4871fab4acc3118cd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15743, "upload_time": "2017-11-22T16:05:05", "url": "https://files.pythonhosted.org/packages/ee/61/cf6a99ab5da0649b17444e4b7f2300af1c762b96c4085bf3264655233e57/onemillion-0.5.1.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "b338dcd7fcc6940a3bf67256eed281a6", "sha256": "21d4fd6afcaee2e9b8e2afdecb924960df34e98faa2863764310f279fcce5d3d" }, "downloads": -1, "filename": "onemillion-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b338dcd7fcc6940a3bf67256eed281a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15755, "upload_time": "2017-12-12T00:23:10", "url": "https://files.pythonhosted.org/packages/87/4e/07f78ccd3cf4751dc4f34ccdd98fb2bcf0fc074947967419b4dc0f27d041/onemillion-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b338dcd7fcc6940a3bf67256eed281a6", "sha256": "21d4fd6afcaee2e9b8e2afdecb924960df34e98faa2863764310f279fcce5d3d" }, "downloads": -1, "filename": "onemillion-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b338dcd7fcc6940a3bf67256eed281a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15755, "upload_time": "2017-12-12T00:23:10", "url": "https://files.pythonhosted.org/packages/87/4e/07f78ccd3cf4751dc4f34ccdd98fb2bcf0fc074947967419b4dc0f27d041/onemillion-1.0.0.tar.gz" } ] }