semvec/pypi-packages huggingface dataset:
osmdiff-mvexel 0.1.9
A library to interact with OpenStreetMap (Augmented) Diff files
Requires Python: >=3.7
Keywords: osm,openstreetmap,diff,augmented diff

# osmdiff

A read-only interface to OpenStreetMap change APIs and files. See also [pyosm](https://github.com/iandees/pyosm) which can do similar things. 

Python 3.7+

## Installing

`pip install osmdiff`

## Usage

### Reading

Retrieve the latest replication diff from the OSM API:

```python
>>> from osmdiff import OSMChange
>>> o = OSMChange()
>>> o.frequency = "minute"  # the default
>>> o.get_state()  # retrieve current sequence ID
>>> o.sequence_number
2704451
>>> o.retrieve()  # retrieve from API
>>> o
OSMChange (677 created, 204 modified, 14 deleted)
```

Read a replication diff from a file:

```python
>>> from osmdiff import OSMChange
>>> o = OSMChange(file="test_osmchange.xml")
>>> o
OSMChange (831 created, 368 modified, 3552 deleted)
```

Retrieve the latest Augmented Diff from Overpass:

```python
>>> from osmdiff import AugmentedDiff
>>> a = AugmentedDiff()
>>> a.get_state()
>>> a.sequence_number
2715051
>>> a.retrieve()
>>> a
AugmentedDiff (747 created, 374 modified, 55 deleted)
```

Read an augmented diff file:

```python
>>> from osmdiff import AugmentedDiff
>>> a = AugmentedDiff(file="test_adiff.xml")
>>> a
AugmentedDiff (2329 created, 677 modified, 39 deleted)
```

### Inspect contents

Get all the things that `chris66` has created:

```
>>> [n for n in a.create if n.attribs["user"] == "chris66"]
[Node 5221564287, Node 5221564288, Node 5221564289, Node 5221564290, Node 5221564291, Node 5221564292, Node 5221564293, Node 5221564294, Node 5221564295, Node 5221564296, Node 5221564297, Node 5221564298, Node 5221564299, Node 5221564301, Node 5221564302, Node 5221564303, Node 5221564304, Way 539648222 (5 nodes), Way 539648223 (5 nodes), Way 539648323 (5 nodes)]
```

Get all `residential` ways that were modified:

```python
>>> [n["new"] for n in a.modify if type(n["new"]) == Way and n["new"].tags.get("highway") == "residential"]
[Way 34561958 (3 nodes), Way 53744484 (6 nodes), Way 53744485 (6 nodes), Way 122650942 (3 nodes), Way 283221266 (4 nodes), Way 344272652 (5 nodes), Way 358243999 (13 nodes), Way 410489319 (5 nodes), Way 452218081 (10 nodes)]
```

Get all ways that were changed to `residential` from something else:

```python
>>> [n["new"] for n in a.modify if type(n["new"]) == Way and n["new"].tags.get("highway") == "residential" and n["old"].tags["highway"] != "residential"]
[Way 410489319 (5 nodes), Way 452218081 (10 nodes)]
```

Inspect details:

```python
>>> w = [n["new"] for n in a.modify if n["new"].attribs["id"] == "452218081"]
>>> w
[Way 452218081 (10 nodes)]
>>> w[0]
Way 452218081 (10 nodes)
>>> w[0].tags
{'highway': 'residential'}
>>> w[0].attribs
{'id': '452218081', 'version': '2', 'timestamp': '2017-11-10T13:52:01Z', 'changeset': '53667190', 'uid': '2352517', 'user': 'carths81'}
>>> w[0].attribs
{'id': '452218081', 'version': '2', 'timestamp': '2017-11-10T13:52:01Z', 'changeset': '53667190', 'uid': '2352517', 'user': 'carths81'}
>>> w[0].bounds
['12.8932677', '43.3575917', '12.8948117', '43.3585947']
```
cloudshell-app-helper 2.0.6
CloudShell package to assist with creating Apps.

# cloudshell-app-helper
## File Location: cloudshell/helpers/app_import, cloudshell/helpers/save_workflow

* **save_app_info_orch.py**
    * save_app_deployment_info
        * Creates a 'DeployInfo' object of deployment info for each App in a Sandbox and saves each to the Sandbox Data

* **deploy_info.py**
    * DeployInfo
        * Serializable Data structure to hold the app templated deployment info and is passed to the Sandbox Data

* **save_app_utility.py**
    * save_flow
        * Will verify that deployment info for this app was saved to the Sandbox Data
        * Will verify that a display image can be gathered from url or existing template, uses default image if not
        * Attempts to run the hidden 'save_app' command from the cloud provider.
        * Gather deployed app attributes
        * Create the App XML and upload

    * save_flow_just_app
        * Will verify that deployment info for this app was saved to the Sandbox Data
        * Will verify that a display image can be gathered from url or existing template, uses default image if not
        * Gather deployed app attributes
        * Create the App XML and upload

* **build_app_xml.py**
    * app_template
        * Takes app deployment info, app resource info and cloud provider info as input
        * Returns the formatted app xml

* **upload_app_xml.py**
    * upload_app_to_cloudshell
        * Creates a full blueprint package with the app xml within
        * Utilizes Quali API to upload the package