ArcREST finally has hosted documentation. Check it out here (http://esri.github.io/ArcREST/index.html)!
Keep on coding.
Tuesday, October 27, 2015
Monday, August 31, 2015
The Walking Metadata (hermes example)
The hermes Python package was released (v1) last week, and now I'm going to show how to read the values instead a given metadata file from a feature class.
In this example, I access the dataset, in this case a feature class. To convert the metadata to a dictionary, call the convert(). Then you can use the dictionary iterator object to walk the data.
This example is just going to show something like:
Enjoy!
import hermes
if __name__ == "__main__":
fc = r"c:\data_and_maps\usa\census\blkgrp.sdc\blkgrp"
paperwork = hermes.Paperwork(dataset=fc)
data = paperwork.convert()
for k,v in data.iteritems():
print k, v
In this example, I access the dataset, in this case a feature class. To convert the metadata to a dictionary, call the convert(). Then you can use the dictionary iterator object to walk the data.
This example is just going to show something like:
metadata {some dictionary value}
Enjoy!
Labels:
ArcGIS 10.3.1,
ArcPy,
Python
Friday, August 28, 2015
Work with metadata check out hermes
So you have to work with metadata? Or you love paperwork, or you just hate using the Python XML packages? Give hermes a try. It is named after And inspired by Hermes Conrad from Futurama.
It is a simple set of tools to translate the Xml to a Python dictionary.
Check it out here: http://github.com/Esri/hermes
Fork it, follow it, improve it.
I'll be posting a couple of usage examples over the next few weeks.
I look forward to everyone's feedback.
Monday, August 3, 2015
ArcREST (v3 beta) manageorg update
On the current master branch, the ArcREST team is up to some good old fashion reworking in the hopes of making life a bit easier when working with portal and AGOL.
In today's push (8/3/2015). The big update is the manageorg sub package is changed to make the user's content iterable.
Let's check out an example:
In today's push (8/3/2015). The big update is the manageorg sub package is changed to make the user's content iterable.
Let's check out an example:
import arcrest
admin = arcrest.manageorg.Administration(url=url,
securityHandler=sh)
user = admin.content.users.user("ARandomUserAccount")
for item in user.items:
print item.id, item.access, item.owner, item.ownerFolder
for k in item:
print k
You'll notice two really interesting things. We are accessing a site with a token handler sh, then we use the for loop syntax to loop through all the items in the root folder. Also, the UserItem object, which is returned from the iterator off of user.items also returns Key/Value pairs from the raw JSON. This means you can get really find grained information from the object, not just what is stubbed out in the class objects.
I would like some feedback on this. It was tons of code changes, and wanted to make sure I didn't drop any functions anyone really needed.
Enjoy!
Friday, July 24, 2015
A Big Thank You And ArcREST Documentation Update!
I want to thank everyone for attending my session. It was great to hear what you are doing, and what you want to do with ArcREST, as well as just meeting all of you. It was exciting to know that I was able to make your workday a little easier and hopefully you can REST a bit better knowing that this package is there to help you out!
I have a lot more work flows to hammer out and ideas to get working on now that I spoke to the users!
While flying back to my home, I pushed out new documentation for the v3.0.0 ArcREST, which can be found here (https://github.com/Esri/ArcREST/tree/master/docs) If you clone the repository, the HTML documentation is pulled down. So update your forks, or re-pull the code to get the latest documentation. I must admit though, I am not the best with Sphinx and Latex, so it's bear bones.
Please feel free to contact me on the issue's page here, or submit a pull request to help make the help documentation look better.
Thank you for attending Esri's UC 2015, attending the ArcREST demo theater presentation, or just talking to me at the developer island. It was a lot of fun to interact with everyone and see all the awesome things people are doing.
Keep on mapping!
~A
I have a lot more work flows to hammer out and ideas to get working on now that I spoke to the users!
While flying back to my home, I pushed out new documentation for the v3.0.0 ArcREST, which can be found here (https://github.com/Esri/ArcREST/tree/master/docs) If you clone the repository, the HTML documentation is pulled down. So update your forks, or re-pull the code to get the latest documentation. I must admit though, I am not the best with Sphinx and Latex, so it's bear bones.
Please feel free to contact me on the issue's page here, or submit a pull request to help make the help documentation look better.
Thank you for attending Esri's UC 2015, attending the ArcREST demo theater presentation, or just talking to me at the developer island. It was a lot of fun to interact with everyone and see all the awesome things people are doing.
Keep on mapping!
~A
Monday, July 20, 2015
ArcREST Exciting Update
The ArcREST team or people.. released v2 final and moved v3 to the main branch on the ArcREST github page.
Why is this exciting? We we continue to take all the feedback we get, especially the comments found here: http://github.com/Esri/ArcREST/issues and improve the package.
Some v3 highlights and what is coming when we finalize v3:
Why is this exciting? We we continue to take all the feedback we get, especially the comments found here: http://github.com/Esri/ArcREST/issues and improve the package.
Some v3 highlights and what is coming when we finalize v3:
- New security handling (PKI, IWA, LDAP)
- AGOL metadata support (adding/updating, downloading, deleting)
- Improved back end code (you won't see it, but it's there)
- Standardized error handler
- 10.4 support
- Python 3 support(separate branch)
- This will be built on top of Python 3.4+
That's some of the what's coming/what's new!
If you are going to the Esri's 2015 User Conference in San Diego, I will be presenting on ArcREST
UC 2015 and ArcREST
The Esri User Conference has started with a flurry of great presentations on what ArcGIS Pro will bring. The first half of Monday's Plenary showed that 3D is here and not a niche market anymore. We live in a 3d world so it is only natural that GIS is moving in that direction. Pro is officially released at v1.1 with a new sdk to modify the program even further. On the web side, smart mapping was shown. For non-cartographic folks out there this is BIG. Mapping that helps you present data properly and logically. Even if you design maps daily, it's nice to have smart mapping there to assist you.
On the ArcREST front, I am presenting on Tuesday @ 1230 in demo theater 11.
Hope to see you all there.
On the ArcREST front, I am presenting on Tuesday @ 1230 in demo theater 11.
Hope to see you all there.
Subscribe to:
Posts (Atom)