semvec/pypi-packages huggingface dataset:
urlwait 1.0
A CLI utility for blocking until a service is listening
License: MIT
Keywords: database_url,tcp,port,docker,service,deploy,deployment

=======
URLWait
=======

.. image:: https://img.shields.io/travis/pmac/urlwait.svg
   :target: https://travis-ci.org/pmac/urlwait/
.. image:: https://img.shields.io/pypi/v/urlwait.svg
   :target: https://pypi.python.org/pypi/urlwait

I needed a way to block my app from starting until the database service was running and
accepting connections. This was particularly a problem when using Docker and docker-compose.
You can run this utility as part of a ``run-dev.sh`` or ``run-tests.sh`` script and it will
block for 15 seconds (configurable) until it can connect to the hostname and port as specified
in your connection URL (gleaned from DATABASE_URL environment variable by default).

Installation
============

::

    $ pip install urlwait

Usage
=====

::

    $ urlwait --help

    Usage:

        $ urlwait [SERVICE URL] [TIMEOUT]

        SERVICE URL is a connection url, e.g. a typical value for $DATABASE_URL. TIMEOUT is
        a number of seconds to try to connect to the host and port specified in the SERVICE
        URL. These values may also be specified in environment variables, but command line
        args take precedence:

            URLWAIT_VARNAME: the env var name containing the URL to check. Default DATABASE_URL.
            URLWAIT_TIMEOUT: the number of seconds to wait. Default 15.

        Returns a 0 status if the connection completed successfully before the timeout, or 1 if not.
        It is designed for use with Docker or other dev or testing environments where the connected
        services and the app are started simultaneously, but one should wait for the other.

    Examples:

        The following are equivalent:

        $ urlwait redis://localhost:6379/0 20
        $ urlwait $CACHE_URL 20
        $ URLWAIT_VARNAME=CACHE_URL URLWAIT_TIMEOUT=20 urlwait

The module is also usable in your python code::

    import os

    from urlwait import wait_for_url


    if wait_for_url(os.getenv('REDIS_URL')):
        # do things with the service
    else:
        # service likely did not start

If you don't have the service URL but do have the host and port, you can use the
``wait_for_service(host, port, timeout)`` function instead.


Python Support
==============

Since version 1.0 urlwait is Python 3 only. If you need Python 2.7 support you can use a pre 1.0 release.

Changelog
=========

* 1.0 - 2020-02-28
  * Close the socket to keep Python from complaining. Thanks @callahad!
  * Update tests to only test on Python 3.6+
  * Drop support for Python 2.x
* 0.4 - 2017-03-02 - Always return true if protocol is sqlite
thonny-ev3dev 1.0.4
A plug-in which adds EV3 support for Thonny
License: MIT
Requires Python: >=3.6
Keywords: IDE education programming EV3 mindstorms lego


The thonny-ev3dev package is a plug-in which adds EV3 support for Thonny.

The thonny-ev3dev plugin makes it easier to program the EV3 programmable 
LEGO brick using the Thonny Python IDE for beginners.

Thonny-ev3dev allows you to run your EV3 program easily

- on the EV3 or
- on the PC in a simulator (default on PC)
- on the PC remotely steering the EV3

The thonny-ev3dev plugin comes with an ev3dev simulator.

For more info about the thonny-ev3dev plugin see: https://github.com/ev3dev-python-tools/thonny-ev3dev/wiki

For more info about Thonny: http://thonny.org
brokJSON 1.0.0
Convert GeoJSON to BrokJSON and vice versa
License: MIT

# BrokJSON
Ever struggled with huge GeoJSON-Files? BrokJSON is your space-saving alternative! Depending on your data you can save up to 80%. **Withouth losing any data!** Why? Because it uses the same ideas as GeoJSON.

The idea behind BrokJSON: **RAM is mightier than the bandwidth** - download the small BrokJSON and convert it on runtime to GeoJSON than loading a huge GeoJSON.

## Example
This **GeoJSON** with just two Points...
```json
{
  "type": "FeatureCollection",
  "features": [
  {
    "type": "Feature",
    "properties": {
      "id": 1,
      "title": "Datapoint 1",
      "value": 343
    },
    "geometry": {
      "type": "Point",
      "coordinates": [8.5402,47.3782]
    }
  },
  {
    "type": "Feature",
    "properties": {
      "id": 1,
      "title": "Datapoint 2",
      "value": 14
    },
    "geometry": {
      "type": "Point",
      "coordinates": [8.5637,47.4504]
    }
  }]
}
```
... looks as a **BrokJSON** like this:

```json
{
  "properties": ["id", "title", "value"],
  "geometries": [{
    "type": "Point",
    "features": [
      [[8.5402, 47.3782], [1, "Datapoint 1", 343]],
      [[8.5637, 47.4504], [1, "Datapoint 2", 14]]
    ]
  }
]}
```
No information lost, everything is there. Amazing!


## Installation
```console
pip install brokjson
```

## Usage
```python
# import BrokJSON
import brokjson

# Load your GeoJSON
geojson = {
    "type": "FeatureCollection",
    "features": [
    {
        "type": "Feature",
        "geometry": {
            "type": "Point",
            "coordinates": [8.5402,47.3782]
        }
    }]
}

# Convert your Json-Object to BrokJson
brok = brokjson.geo2brok(geojson);

# "brok" is your BrokJSON as a dictionary object
print(brok)

# Convert it back
geojson = brokjson.brok2geo(brok)
print(geojson)
```


## Documentation
BrokJSON is a lightweight library, there are only two functions.
### GeoJSON to BrokJSON
```python
brokjson.geo2brok(geoJsonObject)
```
**Parameters**  
`GeoJSON` as a `Dictionary`

**Return value**  
`BrokJSON` as a `Dictionary`

### BrokJSON to GeoJSON
```python
brokjson.brok2geo(brokJsonObject)
```
**Parameters**  
`BrokJSON` as a `Dictionary`

**Return value**  
`GeoJSON` as a `Dictionary`

## Full Spec and other languages
Have a look at https://www.brokjson.dev