Coder Social home page Coder Social logo

arcgis-token's Introduction

ArcGIS Token Generator

Simple Python desktop application to quickly generate an ArcGIS Online token. Users will mainly use this utility when developing applications and require an AGOL token for testing purposes. About ArcGIS Tokens

Getting Started

A self-contained, pre-built executable for this application is available on the Releases page.

Interested in building your own executable? See below.

Usage

Once an executable is downloaded/built and run, a small dialog will appear containing the extent of the application.

  • Supply your username and password for your ArcGIS Online Organizational Account
  • Choose an expiration duration
  • Choose whether the token will be automatically copied to your computer's clipboard
  • Submit the request using the Get Token button
  • Messages will appear showing success status and if granted, a timestamp of expiration
  • Now that you have a token, you can make a request to secured Esri services
  • Example for testing here

Remember that any credits consumed by the requests you make here will be deducted from your ArcGIS Online account. See the Credit Overview for more information and to use a Credit Estimator

How it works

The working code of the application is quite simple and uses the ArcGIS REST API Generate Token operation to request a token

Example:

https://www.arcgis.com/sharing/rest/generateToken
username=jsmith33
password=myPassword
expiration=60 
referer=http://www.arcgis.com

Third Party Libraries Used

Build

Building an executable from this script can be done using py2exe or pyinstaller. The instructions below use pyinstaller to build an self-contained executable named ArcGIS-Token.exe

Download the source code and make sure you have the appropriate dependencies (PyQt4 and pyinstaller)

See the pyinstaller manual for documentation and options.

pip install pyinstaller
pyinstaller --name=ArcGIS-Token --onefile --windowed --noconsole --icon=images/icon-windowed.ico arcgis_token.py

The executable should be created in the /dist folder

Future Improvements

  • Add the ability to generate a token for ArcGIS for Server

Contributing

Please feel free to fork your own copy and to submit issues

arcgis-token's People

Contributors

amarinelli avatar amreldib avatar

Stargazers

 avatar

Watchers

 avatar

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.