About 100 lines of boilerplate API code rewritten from C# to Python

Completed Posted Jun 4, 2013 Paid on delivery
Completed Paid on delivery

I have an API with sample code in C#. I would like the sample code to be rewritten in Python and tested.

-- SpyFuApiRequestBuilder Class --

This will probably be the bulk of the work. This is where the request is set up. It has 2 headers, Timestamp and Authentication. You'll want to make sure the datetime formatting is identical, otherwise the request will fail. Then on the Authentication header, it's basically a keyed HMAC where you're concatenating request elements into a string, then hashing that string with a secret key. One thing to pay attention to here is the ordering of the elements - the ordering needs to be the same, otherwise you could end up with a different hash than the server for the same request data.

-- SampleRequest Class --

This class is fairly simple. All it does it use the SpyFuApiRequestBuilder class to build a request, then submits it, then verifies that it gets a reasonable result back.

-- Testing Notes --

You can use the same username and secret key that are in the C# sample code. The server won't accept requests where the Timestamp is not within 15 minutes of the server time, so you should probably use the current time for each request you make while testing. Doing that should also avoid another possible little issue, which is that the server will only accept a given signature once (no repeated requests). If you just resign with a new datetime though, you should get a fresh hash that will work just fine.

Forgot to mention, for your current timestamp, use the current UTC time.

C# Programming Python

Project ID: #4590189

About the project

8 proposals Remote project Active Jun 6, 2013

Awarded to:

suriyant

I can do it.

$157 USD in 3 days
(16 Reviews)
4.3

8 freelancers are bidding on average $255 for this job

ZergezChateau

I can help you with that project.

$608 USD in 43 days
(1 Review)
4.0
ddhnyh1

Hi. Please check my pm.

$157 USD in 3 days
(4 Reviews)
3.9
vladang

Hi. I am interested for this job

$277 USD in 10 days
(10 Reviews)
3.3
Bramfeld

As experts in Python and HTTP, we could solve this task to your full satisfaction.

$250 USD in 5 days
(1 Review)
2.5
tuanlm101

Hi, I can convert C# to Python with ease, as this is my expertise area.

$150 USD in 5 days
(1 Review)
1.2
zaheerahmad01

HI, Please see PMB.

$188 USD in 10 days
(0 Reviews)
0.0
cnobile2013

I am an experienced software engineer and have been in the business many years. My expertise is in web services. Python is my primary language which I have been doing for over ten years.

$250 USD in 5 days
(0 Reviews)
0.0