GithubHelp home page GithubHelp logo

Comments (12)

achapkowski avatar achapkowski commented on June 16, 2024

This would require a major re-write of the package, since many parts of the package are hinged to ArcPy. I have thought about doing ArcREST without ArcPy components, but when this package started out a decision was made to include ArcPy as a requirement. In addition, I must consider the impact of moving ArcPy outside the package now since it would break user/developers code. It's something that could be included in a future major release, like version 3.
Right now, you can pull the components of the package, like the manageorg/manageportal packages and remove the components you do not need. You'll have to update some of the init.py files, and ensure that all imports are correct, but it should be doable.

Thank you

from arcrest.

blairdgeo avatar blairdgeo commented on June 16, 2024

👍 for a version minus ArcPy dependency. This would be nice for cloud devops jobs which need to mainly startup or terminate services and various items. Thank you for listening :)

from arcrest.

ajturner avatar ajturner commented on June 16, 2024

+1 for major version change that pulls out ArcPy dependencies. This would be useful for cross platform scripts as well as Django/Flask web apps.

from arcrest.

achapkowski avatar achapkowski commented on June 16, 2024

We will start taking a look at this.

I like the idea of a Django/Flask web application, this could be part of a large solution to manage one's AGOL, Portal or AGS site.

from arcrest.

ljumbam avatar ljumbam commented on June 16, 2024

image

from arcrest.

achapkowski avatar achapkowski commented on June 16, 2024

There is a new branch ready for testing. Pull it and let me know how it works without ArcPy.
https://github.com/Esri/ArcREST/tree/ArcPyOptional

from arcrest.

achapkowski avatar achapkowski commented on June 16, 2024

@ajturner can you post a use case for wanting to make a django application?

Andrew

from arcrest.

ajturner avatar ajturner commented on June 16, 2024

@achapkowski

As a Developer building a business, I want to use ArcGIS Online and hosted services as my content management system & authentication.

Another example, CKAN is built with Python and we would be interested in building closer integrations with searching and loading data for organizations that use it for catalog management - such as the US DOI.

from arcrest.

achapkowski avatar achapkowski commented on June 16, 2024

from issue #82
Maybe nothing but helperservices in agol not there for arcpy-optional, and osx is having issues building without it.

from arcrest.

blairdgeo avatar blairdgeo commented on June 16, 2024

First off BIG thank you @achapkowski. I did a quick test against the https://github.com/Esri/ArcREST/tree/ArcPyOptional branch and I am having some issues. Let me review what I have done to test. It could be user error :)

Cloned repo and checked out new ArcPyOptional branch

git checkout ArcPyOptional

Install python packages

python setup.py install

This returns errors specific to a missing package:

copying arcrest/agol/tiledservice.py -> build/lib/arcrest/agol
error: package directory 'arcrest/agol/helperservices' does not exist install

To fix this I moved the https://github.com/Esri/ArcREST/tree/master/src/arcrest/agol/helperservices directory from the master branch to /src/arcrest/agol/helperservices under the new ArcPyOptional

Re-run the install. Success.

Writing /Library/Python/2.7/site-packages/ArcREST-3.0.0-py2.7.egg-info

The problem I run into is if I try to run a simple item upload similar to the following sample code: https://github.com/Esri/ArcREST/blob/master/samples/add_item.py

When I try and run this sample with my credentials I am getting the following error:


Traceback (most recent call last):
  File "/Users/blairdeaver/Downloads/mypython.py", line 4, in 
    import arcrest
  File "/Library/Python/2.7/site-packages/arcrest/__init__.py", line 1, in 
    import agol
  File "/Library/Python/2.7/site-packages/arcrest/agol/__init__.py", line 1, in 
    from featureservice import *
  File "/Library/Python/2.7/site-packages/arcrest/agol/featureservice.py", line 12, in 
    import layer as servicelayers
  File "/Library/Python/2.7/site-packages/arcrest/agol/layer.py", line 14, in 
    from ..common import filters
  File "/Library/Python/2.7/site-packages/arcrest/common/__init__.py", line 1, in 
    import spatial
  File "/Library/Python/2.7/site-packages/arcrest/common/spatial.py", line 4, in 
    from .. import arcpyFound
ImportError: cannot import name arcpyFound

Any ideas? As for more details on the use case for this branch:

  • I want to use this library to be able to administer AGO services from the command line on any OS without the need for Desktop

Thank you.

from arcrest.

achapkowski avatar achapkowski commented on June 16, 2024

@blairdgeo can you try using the main branch. We are attempting to just make it so you do not need ArcPy with ArcREST based on all the feedback we have received from this thread and other means of communication.

I believe ArcRESTHelper has been tested and works without arcpy, the main package has not been fully tested.

from arcrest.

achapkowski avatar achapkowski commented on June 16, 2024

Issue resolved, main branch will have arcpy as optional as default.

from arcrest.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.