jgoldshlag / crespy Goto Github PK
View Code? Open in Web Editor NEWPython Wrapper for EVE CREST API
Python Wrapper for EVE CREST API
Running sample.py with the current version of the code results in the following error (under Python 2.7.5):
Traceback (most recent call last):
File "sample.py", line 16, in <module>
for item in prices['items']:
File "C:\Users\Jonathan\Documents\EVE\crespy-master\crespy-master\crespy.py",
line 42, in __getitem__
child._headers = self._headers
AttributeError: 'list' object has no attribute '_headers'
I'm not sure why we need headers if the child is not a href, but if we really need to keep them we need to make child a class which has a _headers attribute defined.
I needed Python 3 support so I wrote https://github.com/SuevRaylap/crespy/tree/Python-3 with some help on I found on /r/evetech
Would you be interested in having a 2nd branch for python 3 and adding it to the readme?
CrespyObj::__getitem__
will discard the _header values when key is not "href"
This causes Authenticated CREST calls to fail by stripping the Authorization-Header
Following alternative implementation fixed the problem for me:
def __getitem__(self,key):
if key == u"href":
child = CrespyObj()
child._url = self._data[key]
child._headers = self._headers
return child
else:
child = self._data[unicode(key)]
child._headers = self._headers
return child
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.