xero_python Create Timesheet - python

I'm working off xero_python app example seen here and attempting to make a create_timesheet route.
So far I've not found any material on creating timesheets using xero_python.payrollau so wondering if anyone here might have some experience with this?
I've shared my current example as an issue for the above git. I keep hitting various hurdles such as timesheet ids not being accepted/etc.
If anyone has been successful with the above I would be super grateful for some guidance here.

Related

Add entities in Maltego through an api

Im working with Maltego and I would like to add entities to a graph from a server through an api.
Is that possible?
I would say that it is not possible but in a project are asking me to do that and I don't know how to do it. I've been looking for information for a few days and I can't find anything.
Thanks in advance.
I have not tested anything because reading the documentation I do not see it possible.

SSO implementation using djangosaml2

Experts,
I am a novice in implementing the SSO (SAML) for a django application. I want to use SAML integration using djangosaml2/pysaml2. Any best tutorial with example is very much helpful.
First thing : What you have tried ?
Before asking your question you should tell community what you tried and you caught up with some issues.
However you are new here I would like to answer it for you.
There are many SAML2 packages are available on pypi please go through it.
One of them is Here
You have to get the xml from your IDP (Identity provider) and you have to ask your IDP to configure your metadata in IDP system.
The above library will help you to generate your metadata.Please follow the steps given in documentation
Try and then if you get some issue do let us know.

Postgres data loss

We have an app hosted on Heroku. Recently, I witnessed data being lost from the postgres database. The app is made with django, and there are news articles. So I edited the title of an article and saved it. I could see that changes were saved in the django admin and on the site the corrected title appeared. But after a while, the old version of the title reappeared on the site. So I edited the title for the second time, and the same thing happened again. This time, it took sometime between 1 and 30 minutes for the old version to reappear.
I am completely confused to what might be happening here. There is no indication of any kind of error in the logs.
I asked Heroku support for assistance, but without being able to reproduce the error, they couldn't really do much.
This phenomenon happened twice. I'd like to understand it so if anyone has a theory, please share it.
Thanks!

Possible MySQL authentication issue with python package (PyMySQL3)

I actually found a blog post that pretty much sums up my problem. Its at
http://simon04.net/2013/03/python3-mysql/
The blog post is the most clear but to summarize: I'm currently trying to access a remote MySQL database with a python package called PyMySQL3. However I keep getting the error: "AttributeError: 'bytes' object has no attribute 'encode'". From the blog post above and some other research, I think this has to do with my database having an old authentication method.
However, I'm confused because it looks like the old authentication method was phased out sometime in MySQL 4.0. The database I have runs MySQL 5.0.51a. Shouldn't my database have the correct authentication?
I've been working on this awhile and getting a little frustrated. Hopefully someone can help. Thanks,
From https://github.com/petehunt/PyMySQL/issues/64
For me this problem was due to the usage of the old authentication
method (cf.
http://dev.mysql.com/doc/internals/en/authentication-method.html).
Creating a new user (resetting the password might work as well) and
making sure that the password column for this user in the mysql.user
table starts with a * (otherwise check the server configuration
according to the above link), solved the problem for me.
Have you created the users with this very Version you mentioned?
The thread shows how to fix the problem in the code aswell, tellme when you need additional help to fix it. I would edit my answer accordingly.
Ok, while investigating this more I thought that maybe my hosting company (aplus.net) just wasn't up to date. I was going to switch companies anyways and so I opened a new account with another company. Now I have no problems connecting with PyMySQL3. So apparently, my old hosting company just wasn't up to date or at least their sql configuration was breaking PyMySQL3.
Thanks for your reponse though. Hopefully not many other people have this issue because switching hosting companies isn't always the best answer =O

Simple API's to play around with for Python/Django?

Does anyone know of simple and well documented API's with plenty of hand holding examples that assumes very little or no prior knowledge of web development?
I've been messing around with Pyfacebook and Facebook-Python-SDK in trying to create a simple photo display app but I haven't been able to make much headway after spending the last few days on it. The main reason for this is simply because I just wasn't able to find a good tutorial that walks me through all the steps. So, I'm putting this mini project on pause and looking for lower hanging fruit.
In terms of skill level, I'm pretty ok on the basics of Python and Django.
Update
I've done the tutorials at http://www.djangoproject.com/ already. Really looking for ideas and suggestions on webapp projects that utilises an API. E.g, a twitter app that displays a user's most frequently used keywords in a tagcloud.
Update2
Side note: Having mess around with Twitter's API for a little bit, I would definitely recommend to start with Twitter first as opposed to Facebook. It's easier and better documented.
Best place to start is with tutorials on djangoproject.com.
Have you tried the Django tutorial? It is pretty basic, but touches on all important points required to develop your own basic app.
django-basic-apps contains a collection of apps you might enjoy reading.
Edit: Check out this good list of web services I found. :)
As far as I know you can't write facebook apps with Django. Facebook uses their own API and stuff. They are completely different.
And for the twitter API thingy I have an idea.
Develop a django app which can used to
scrap and backup tweets.
The scenario is during any FOSS
conference, they are using a #hastag
to identify tweets related to that
conf. But after sometime these tweets
don't show up even on search. For
example we used #inpycon2010 tag for
Pycon conf in India. But now when I
search for this tag, nothing shows up.
So what you can do allow users to
register a hastag and set a time
interval. Within that time interval
your app should scrap all the tweets
and backup them. The user should be
able to retreive from that later.
If you start this a foss project, I'm ready to jump in :)

Categories