semvec/pypi-packages huggingface dataset:
random-user-agent 1.0.1
A package to get random user agents based filters provided by user
License: MIT

Random User Agents
==================

Random User Agents is a python library that provides list of user agents,
from a collection of more than 326,000+ user agents, based on filters.

Some of the filter names which can be passed to `UserAgent()` are listed below:

    operating_systems : [
        UNIX, LINUX, WINDOWS, MAC, ...
    ]

    hardware_types : [
        MOBILE, COMPUTER, SERVER, ...
    ]

    software_types : [
        WEB_BROWSER, BOT__CRAWLER, BOT__ANALYSER, ...
    ]

    software_names : [
       EDGE, CHROME, CHROMIUM, ANDROID, FIREFOX, OPERA, ...
    ]

    software_engines : [
       BLINK, GECKO, WEBKIT, ...
    ]

    popularity : [
        POPULAR, COMMON, AVERAGE, ....
    ]


*All filters are available in random_user_agent.params*


Installation
------------

You can install random_useragent by running the following command:

    pip install random_user_agent

Or you can download direct from [Github](https://github.com/Luqman-Ud-Din/random_user_agent) and install it manually.


Usage
-----

To get 100 user agents of browser `chrome` based on operating systems `windows` or `linux`


```python
    from random_user_agent.user_agent import UserAgent
    from random_user_agent.params import SoftwareName, OperatingSystem


    # you can also import SoftwareEngine, HardwareType, SoftwareType, Popularity from random_user_agent.params
    # you can also set number of user agents required by providing `limit` as parameter

    software_names = [SoftwareName.CHROME.value]
    operating_systems = [OperatingSystem.WINDOWS.value, OperatingSystem.LINUX.value]   

    user_agent_rotator = UserAgent(software_names=software_names, operating_systems=operating_systems, limit=100)

    # Get list of user agents.
    user_agents = user_agent_rotator.get_user_agents()

    # Get Random User Agent String.
    user_agent = user_agent_rotator.get_random_user_agent()

```

License
-------
The MIT License (MIT). Please see [License File](https://github.com/Luqman-Ud-Din/random_user_agent/blob/master/LICENSE) for more information.


User Agents Source
-------
special thanks to [whatismybrowser](https://developers.whatismybrowser.com/) for providing real user agents.
dict-converter 0.1.2
A chain-line dict converter in Python 3
License: MIT


dict-converter
===============

A chain-line dict converter in Python 3

Example
-------

>>> from dict_converter import DictConverter
>>> a = {'a': 'a', 'b': 'b', 0: 0}
>>> DictConverter(a).add(0, lambda s: s + 1).add(['a', 'b'], str.upper).result()
{'a':'A','b':'B', 0:1}

Install
-------

.. code-block:: shell
pip install condition_chain

Author
------
Yixian Du (duyixian1234@outlook.com)
Cities 1.1
Cities is a simple tool for searching cities located at a given longitude and latitude range.
License: MIT
Requires Python: >=3.5.0


Cities is a simple tool for searching cities located at a given longitude and latitude range or a given region(country, state, province). 
All the cities returned are sorted by the importance of a city and the population density.

# Install
```commandline
pip install Cities
```

# Features
1. fast(less than 0.01s for each retrieving), simple and convenient.
2. cover all the cities around the world.
3. the author is cute.

# Required File
Download  the [city data](https://pan.baidu.com/s/10qjtq9jl7tLxXeypfJCrEg) and put it at any directory you want. Remember to set the path up when you initiate an instance.

# Example
```python
from Cities import cities_retriever

cr = cities_retriever.CitiesRetrieverByRect("Sources/dict_all_cities_rect2cities.json")
cities = cr.retrieve_cities(lon_start=-124.71, lon_end=-77.21, lat_start=25.24, lat_end=44.75, num=500) # num is optional, default: 999999
print(cities)
print(len(cities))

cr = cities_retriever.CitiesRetrieverByRegionName("Sources/dict_all_cities_region2cities.json")
cities = cr.retrieve_cities(country="United States", region="Washington", num=500) # region and num are optional
print(cities)
print(len(cities))
```
# Note
the bigger the dict file is, the longer the loading time is.
## 4million cities --- 12s
1. dict_all_cities_region2cities.json
2. dict_all_cities_rect2cities.json
## 8000 cities --- < 1s
1. dict_cities_8000_region2cities.json
2. dict_cities_8000_rect2cities.json