diff options
Diffstat (limited to '_posts')
| -rw-r--r-- | _posts/2009-12-13-riak-perl-and-kiokudb.md | 3 | ||||
| -rw-r--r-- | _posts/2009-12-20-moosex-net-api.md | 4 | ||||
| -rw-r--r-- | _posts/2009-12-21-tatsumaki-or-how-to-write-a-nice-webapp-in-less-than-two-hours.md | 2 | ||||
| -rw-r--r-- | _posts/2010-03-19-easily-create-rest-interface-with-the-dancer-1.170.md | 2 | ||||
| -rw-r--r-- | _posts/2010-04-03-more-fun-with-tatsumaki-and-plack.md | 4 | ||||
| -rw-r--r-- | _posts/2010-04-14-presque-a-redis-tatsumaki-based-message-queue.md | 2 | ||||
| -rw-r--r-- | _posts/2010-04-19-the-dancer-ecosystem.md | 4 | ||||
| -rw-r--r-- | _posts/2010-06-10-moosex-net-api-update.md | 4 | ||||
| -rw-r--r-- | _posts/2010-06-25-presque-new_features.md | 4 | ||||
| -rw-r--r-- | _posts/2010-09-10-dancer-summer-of-code.md | 6 | ||||
| -rw-r--r-- | _posts/2010-11-22-vagrant-rocks.md | 2 | ||||
| -rw-r--r-- | _posts/2011-06-20-stargit.md | 42 | ||||
| -rw-r--r-- | _posts/2012-02-17-HTTP_requests_with_python.md | 22 |
13 files changed, 49 insertions, 52 deletions
diff --git a/_posts/2009-12-13-riak-perl-and-kiokudb.md b/_posts/2009-12-13-riak-perl-and-kiokudb.md index 5065042..3221f2a 100644 --- a/_posts/2009-12-13-riak-perl-and-kiokudb.md +++ b/_posts/2009-12-13-riak-perl-and-kiokudb.md @@ -14,7 +14,7 @@ One of the nice things with Riak it's that it let you defined the N, R and W val * R: the number of replicas required to perform a read operation * W: the number of replicas needed for a write operation -Riak comes with library for python ruby PHP and even javascript, but not for Perl. As all these libraries are just communicating with Riak via the REST interface, I've <a href="http://github.com/franckcuny/anyevent-riak">started to write one</a> using AnyEvent::HTTP, and <a href="http://github.com/franckcuny/kiokudb-backend-riak">also a backend for KiokuDB</a>. +Riak comes with library for python ruby PHP and even javascript, but not for Perl. As all these libraries are just communicating with Riak via the REST interface, I've <a href="http://git.lumberjaph.net/p5-anyevent-riak.git/">started to write one</a> using AnyEvent::HTTP, and <a href="http://git.lumberjaph.net/p5-kiokudb-backend-riak.git/">also a backend for KiokuDB</a>. ## Installing and using Riak @@ -151,4 +151,3 @@ my $dir = KiokuDB->new( $dir->txn_do(sub { $dir->insert($key => $object) }); {% endhighlight %} - diff --git a/_posts/2009-12-20-moosex-net-api.md b/_posts/2009-12-20-moosex-net-api.md index 6589ec7..2f93f63 100644 --- a/_posts/2009-12-20-moosex-net-api.md +++ b/_posts/2009-12-20-moosex-net-api.md @@ -29,7 +29,7 @@ The `twitter_api_method` method is exported with Moose::Exporter. It generates a ## MooseX::Net::API -As I've found this approch nice and simple, I thought about writing a [little framework](http://github.com/franckcuny/moosex-net-api) to easily write API client this way. I will show how I've write a [client for the Backtype API](http://github.com/franckcuny/net-backtype) using this (I've wrote some other client for private API at works too). +As I've found this approch nice and simple, I thought about writing a [little framework](http://git.lumberjaph.net/p5-moosex-net-api.git/) to easily write API client this way. I will show how I've write a [client for the Backtype API](http://git.lumberjaph.net/p5-net-backtype.git/) using this (I've wrote some other client for private API at works too). ## Backtype API @@ -107,4 +107,4 @@ In case there is an error, an MooseX::Net::API::Error will be throw. ## Conclusion Right now, this module is not finished. I'm looking for suggestions (what should be added, done better, how I can improve stuff, ...). I'm not aiming to handle all possibles API, but at least most of the REST API avaible. I've uploaded a first version of -[MooseX::Net::API](http://search.cpan.org/perldoc?MooseX::Net::API) and [Net::Backtype](http://search.cpan.org/perldoc?Net::Backtype) on CPAN, and [the code](http://github.com/franckcuny/net-backtype) is also [available on GitHub](http://github.com/franckcuny/moosex-net-api). +[MooseX::Net::API](http://search.cpan.org/perldoc?MooseX::Net::API) and [Net::Backtype](http://search.cpan.org/perldoc?Net::Backtype) on CPAN, and [the code](http://git.lumberjaph.net/p5-net-backtype.git/) is also [available on my git server](http://git.lumberjaph.net/p5-moosex-net-api.git/). diff --git a/_posts/2009-12-21-tatsumaki-or-how-to-write-a-nice-webapp-in-less-than-two-hours.md b/_posts/2009-12-21-tatsumaki-or-how-to-write-a-nice-webapp-in-less-than-two-hours.md index ade7e55..ae08a9b 100644 --- a/_posts/2009-12-21-tatsumaki-or-how-to-write-a-nice-webapp-in-less-than-two-hours.md +++ b/_posts/2009-12-21-tatsumaki-or-how-to-write-a-nice-webapp-in-less-than-two-hours.md @@ -6,7 +6,7 @@ title: Tatsumaki, or how to write a nice webapp in less than two hours Until today, I had a script named "lifestream.pl". This script was triggered via cron once every hour, to fetch various feeds from services I use (like <a href="http://github.com/">github</a>, <a href="http://identi.ca/">identi.ca</a>, ...) and to process the result through a template and dump the result in a HTML file. -Today I was reading <a href="http://github.com/miyagawa/Tatsumaki">Tatsumaki's code</a> and some examples (<a href="http://github.com/gugod/Social">Social</a> and <a href="http://github.com/miyagawa/Subfeedr">Subfeedr</a>). Tatsumaki is a "port" <a href="http://www.tornadoweb.org/">tornado</a> (a non blocking server in Python), based on Plack and AnyEvent. I though that using this to replace my old lifestream script would be a good way to test it. Two hours later I have a complete webapp that works (and the code is available <a href="http://github.com/franckcuny/lifestream">here</a>). +Today I was reading <a href="http://github.com/miyagawa/Tatsumaki">Tatsumaki's code</a> and some examples (<a href="http://github.com/gugod/Social">Social</a> and <a href="http://github.com/miyagawa/Subfeedr">Subfeedr</a>). Tatsumaki is a "port" <a href="http://www.tornadoweb.org/">tornado</a> (a non blocking server in Python), based on Plack and AnyEvent. I though that using this to replace my old lifestream script would be a good way to test it. Two hours later I have a complete webapp that works (and the code is available <a href="http://git.lumberjaph.net/p5-lifestream.git/">here</a>). The code is really simple: first, I define an handler for my HTTP request. As I have only one things to do (display entries), the handler is really simple: diff --git a/_posts/2010-03-19-easily-create-rest-interface-with-the-dancer-1.170.md b/_posts/2010-03-19-easily-create-rest-interface-with-the-dancer-1.170.md index b37f9af..3ddf3a4 100644 --- a/_posts/2010-03-19-easily-create-rest-interface-with-the-dancer-1.170.md +++ b/_posts/2010-03-19-easily-create-rest-interface-with-the-dancer-1.170.md @@ -31,7 +31,7 @@ serializer: "JSON" ## A simple handler -Let's create a new dancer application (you can fetch the source on [GitHub](http://github.com/franckcuny/dancerREST) : +Let's create a new dancer application (you can fetch the source on [my git server](http://git.lumberjaph.net/p5-dancer-rest.git/) : {% highlight bash %} % dancer -a dancerREST diff --git a/_posts/2010-04-03-more-fun-with-tatsumaki-and-plack.md b/_posts/2010-04-03-more-fun-with-tatsumaki-and-plack.md index 8781689..edb3d81 100644 --- a/_posts/2010-04-03-more-fun-with-tatsumaki-and-plack.md +++ b/_posts/2010-04-03-more-fun-with-tatsumaki-and-plack.md @@ -61,7 +61,7 @@ ETag: 7b502c3a1f48c8609ae212cdfb639dee39673f5e ### Plack::Middleware::Throttle -[With this middleware](http://github.com/franckcuny/plack--middleware--throttle), you can control how many times you want to provide an access to your application. This module is not yet on CPAN, has I want to add some features, but you can get the code on github. There is four methods to control access: +[With this middleware](http://git.lumberjaph.net/p5-plack-middleware-throttle.git/), you can control how many times you want to provide an access to your application. This module is not yet on CPAN, has I want to add some features, but you can get the code from git. There is four methods to control access: * Plack::Middleware::Throttle::Hourly: how many times in one hour someone can access the application * P::M::T::Daily: the same, but for a day @@ -134,7 +134,7 @@ This middleware could be a very good companion to the [Dancer REST stuff](http:/ ## another Tatsumaki application with Plack middlewares -To demonstrate the use of this two middleware, [I wrote a small application](http://github.com/franckcuny/feeddiscovery) with Tatsumaki. This application fetch a page, parse it to find all the feeds declared, and return a JSON with the result. +To demonstrate the use of this two middleware, [I wrote a small application](http://git.lumberjaph.net/p5-feeddiscovery.git/) with Tatsumaki. This application fetch a page, parse it to find all the feeds declared, and return a JSON with the result. {% highlight bash %} % GET http://feeddiscover.tirnan0g.org/?url=http://lumberjaph.net/blog/ diff --git a/_posts/2010-04-14-presque-a-redis-tatsumaki-based-message-queue.md b/_posts/2010-04-14-presque-a-redis-tatsumaki-based-message-queue.md index cdb92c7..9e057b9 100644 --- a/_posts/2010-04-14-presque-a-redis-tatsumaki-based-message-queue.md +++ b/_posts/2010-04-14-presque-a-redis-tatsumaki-based-message-queue.md @@ -53,7 +53,7 @@ When a job is fetched, it's removed from the queue. ## A basic worker -I've also uploaded [presque::worker](http://github.com/franckcuny/presque-worker/tree/) to GitHub. It's based on [AnyEvent::HTTP](http://search.cpan.org/perldoc?AnyEvent::HTTP) and [Moose](http://search.cpan.org/perldoc?Moose). Let's write a basic worker using this class: +I've also pushed [presque::worker](http://git.lumberjaph.net/p5-presque-worker.git/). It's based on [AnyEvent::HTTP](http://search.cpan.org/perldoc?AnyEvent::HTTP) and [Moose](http://search.cpan.org/perldoc?Moose). Let's write a basic worker using this class: {% highlight perl %} use strict; diff --git a/_posts/2010-04-19-the-dancer-ecosystem.md b/_posts/2010-04-19-the-dancer-ecosystem.md index d201a72..3e3703b 100644 --- a/_posts/2010-04-19-the-dancer-ecosystem.md +++ b/_posts/2010-04-19-the-dancer-ecosystem.md @@ -25,14 +25,14 @@ Out of the box, Dancer only has a simple logging system to write to file, but mo <ul> <li><a href="http://search.cpan.org/perldoc?Dancer::Logger::Syslog">Dancer::Logger::Syslog</a> by sukria</li> <li><a href="http://search.cpan.org/perldoc?Dancer::Logger::LogHandler">Dancer::Logger::LogHandler</a> by me</li> -<li><a href="http://github.com/franckcuny/Dancer-Logger-PSGI">Dancer::Logger::PSGI</a> by me</li> +<li><a href="http://git.lumberjaph.net/p5-dancer-logger-psgi.git/">Dancer::Logger::PSGI</a> by me</li> </ul> The last one is for writing directly your log message via <ah href="http://search.cpan.org/perldoc?Plack">Plack</a>. You can use a middleware like <a href="http://search.cpan.org/~miyagawa/Plack-0.9932/lib/Plack/Middleware/LogDispatch.pm">P::M::LogDispatch</a> or <a href="http://search.cpan.org/~miyagawa/Plack-0.9932/lib/Plack/Middleware/Log4perl.pm">P::M::Log4perl</a> to handle logs for your application. Even better, if you use <a href="http://github.com/miyagawa/Plack-Middleware-ConsoleLogger">P::M::ConsoleLogger</a>, you can have logs from your Dancer application in your javascript console. ## Debug -To debug your application with Plack, you can use the awesome <a href="http://search.cpan.org/perldoc?Plack::Middleware::Debug">Plack::Middleware::Debug</a>. I've writen <a href="http://github.com/franckcuny/dancer-debug">Dancer::Debug</a> (which requires my fork of <a href="http://github.com/franckcuny/Plack-Middleware-Debug">P::M::Debug</a>), a middleware that add panels, with specific informations for Dancer applications. +To debug your application with Plack, you can use the awesome <a href="http://search.cpan.org/perldoc?Plack::Middleware::Debug">Plack::Middleware::Debug</a>. I've writen <a href="http://git.lumberjaph.net/p5-dancer-debug.git/">Dancer::Debug</a> (which requires my fork of <a href="http://github.com/franckcuny/Plack-Middleware-Debug">P::M::Debug</a>), a middleware that add panels, with specific informations for Dancer applications. <img src="/static/imgs/4535496880_37e5e68a57_z.jpg"alt="Dancer::Debug middleware" /> diff --git a/_posts/2010-06-10-moosex-net-api-update.md b/_posts/2010-06-10-moosex-net-api-update.md index 452038e..b7b84ec 100644 --- a/_posts/2010-06-10-moosex-net-api-update.md +++ b/_posts/2010-06-10-moosex-net-api-update.md @@ -4,7 +4,7 @@ summary: In which I write an update about MooseX::Net::API title: Moosex::Net::API - update --- -[MooseX::Net::API](http://github.com/franckcuny/moosex-net-api) is a module to help writing clients for RESTful (and even non-RESTful) WebServices: +[MooseX::Net::API](http://git.lumberjaph.net/p5-moosex-net-api.git/) is a module to help writing clients for RESTful (and even non-RESTful) WebServices: {% highlight perl %} package my::api; @@ -61,7 +61,7 @@ It's not yet complete, but a new version will be available soon on CPAN. Here is ## http-console -I've also started [Net::HTTP::Console](http://github.com/franckcuny/net-http-console). It's inspired by [http-console](http://github.com/cloudhead/http-console). It relies on MX::Net::API, and can use any libraries written with MX::Net::API, as well as any **raw** RESTful API. As an example, let's use it on twitter. +I've also started [Net::HTTP::Console](http://git.lumberjaph.net/p5-net-http-console.git/). It's inspired by [http-console](http://github.com/cloudhead/http-console). It relies on MX::Net::API, and can use any libraries written with MX::Net::API, as well as any **raw** RESTful API. As an example, let's use it on twitter. {% highlight bash %} % http-console --url http://api.twitter.com --format json diff --git a/_posts/2010-06-25-presque-new_features.md b/_posts/2010-06-25-presque-new_features.md index 4d2923c..58eddca 100644 --- a/_posts/2010-06-25-presque-new_features.md +++ b/_posts/2010-06-25-presque-new_features.md @@ -22,7 +22,7 @@ The REST interface is simple, and there is only a few methods. It's fast (I will There have been a lot of refactoring lately. The main features missing right now are a simple HTML interface that will display various informations, pulling the data from the REST API (hint : if someone want to help to design this one ... :) ), websocket (sending a message to all workers). -There is a Perl client to the REST API: [net::presque](http://github.com/franckcuny/net-presque), that you can use with [net::http::console](http://github.com/franckcuny/net-http-console): +There is a Perl client to the REST API: [net::presque](http://git.lumberjaph.net/p5-net-presque.git/), that you can use with [net::http::console](http://git.lumberjaph.net/p5-net-http-console.git/): {% highlight bash %} % perl bin/http-console --api_lib Net::Presque --url http://localhost:5000 @@ -33,7 +33,7 @@ http://localhost:5000> fetch_job {"queue_name":"twitter_stream"} } {% endhighlight %} -I've also wrote a better [worker for Perl](http://github.com/franckcuny/presque-worker). It's a Moose::Role that you apply to your class. You need to write a **work** method, and your done. This worker handle retries, provide a logger, ... As for [resque](http://github.com/defunkt/resque), there is two dispatcher: +I've also wrote a better [worker for Perl](http://git.lumberjaph.net/p5-presque-worker.git/). It's a Moose::Role that you apply to your class. You need to write a **work** method, and your done. This worker handle retries, provide a logger, ... As for [resque](http://github.com/defunkt/resque), there is two dispatcher: * normal : the worker grab a job, process it, then ask for the next job * fork : the worker grab a job, fork, let the child do the job and exit, while the parent ask for the next job. As resque says, "Resque assumes chaos". And me too, I like (ordered) chaos diff --git a/_posts/2010-09-10-dancer-summer-of-code.md b/_posts/2010-09-10-dancer-summer-of-code.md index a8bc7f7..4f92a8b 100644 --- a/_posts/2010-09-10-dancer-summer-of-code.md +++ b/_posts/2010-09-10-dancer-summer-of-code.md @@ -62,7 +62,7 @@ Now you can request **/** and **/forum**. The before filter declared in the pack ### QA -The weekend following the YAPC::EU, we held a small hackaton/QA day on irc. Not many people were present, but we managed to achieve some results: +The weekend following the YAPC::EU, we held a small hackaton/QA day on irc. Not many people were present, but we managed to achieve some results: * reached the 1K tests * documentation cleanup @@ -71,7 +71,7 @@ The weekend following the YAPC::EU, we held a small hackaton/QA day on irc. Not Today our code average is over 92%, and we have more than 1200 tests. -With the new hook system, two new keywords have been added: **before_template** and **after**. They work as the **before** keyword, except the **before_template** is executed before sending the tokens to the template, so you can modify them (a small example can be found in the [Dancer::Plugin::i18n](http://github.com/franckcuny/dancer-plugin-i18n)). The **after** is executed before the response is sent to the user. +With the new hook system, two new keywords have been added: **before_template** and **after**. They work as the **before** keyword, except the **before_template** is executed before sending the tokens to the template, so you can modify them (a small example can be found in the [Dancer::Plugin::i18n](http://git.lumberjaph.net/p5-dancer-plugin-18n.git/)). The **after** is executed before the response is sent to the user. Sukria has also set up an autobuild system for our two main branches. Every 15 minutes, the test suite is executed when there is a new commit, and builds a report. Code coverage is also measured, so we can always know the state of our various development cycles. @@ -87,7 +87,7 @@ We investigated various ways to do this: I didn't want to write a websocket implementation for Dancer, as the spec are not yet final and it's not easy to do. Thanks to [clkao](http://github.com/clkao), we didn't have to care about all this, as he already wrote a Plack middleware for this: [Web::Hippie](http://search.cpan.org/perldoc?Web::Hippie::Pipe). -So, what we did, is to use this middleware and add some syntactic sugar so people can use it easily in their applications. A small application is available [here](http://github.com/franckcuny/dancer-chat). +So, what we did, is to use this middleware and add some syntactic sugar so people can use it easily in their applications. A small application is available [here](http://git.lumberjaph.net/p5-dancer-chat.git/). This is not yet complete, it's only available in the 'devel' branch, and subject to change. A small code sample: diff --git a/_posts/2010-11-22-vagrant-rocks.md b/_posts/2010-11-22-vagrant-rocks.md index 3d9da05..70d9d7e 100644 --- a/_posts/2010-11-22-vagrant-rocks.md +++ b/_posts/2010-11-22-vagrant-rocks.md @@ -84,7 +84,7 @@ require_recipe "runit" If the VM is already started, you can run `vagrant provision` or `vagrant up`. This will deploy the previous cookbooks on the VM. When it's done, you can log on the VM with `vagrant ssh`. -You'll need to additional recipes: one for redis; one for presque. You'll find them on my [GitHub account](http://github.com/franckcuny/cookbooks/). Copy the two recipes inside your cookbook directory, and execute `vagrant provision` to install them. +You'll need to additional recipes: one for redis; one for presque. You'll find them on my [GitHub account](http://git.lumberjaph.net/chef-cookbooks.git/). Copy the two recipes inside your cookbook directory, and execute `vagrant provision` to install them. If everything works fine, you should be able to start using presque. Test this: diff --git a/_posts/2011-06-20-stargit.md b/_posts/2011-06-20-stargit.md index 0438359..746974b 100644 --- a/_posts/2011-06-20-stargit.md +++ b/_posts/2011-06-20-stargit.md @@ -16,7 +16,7 @@ And of course, [the poster](http://labs.linkfluence.net). Feel free to print it ## The data -All the data are available! Last year I got some mails asking me for the dataset. So this time I asked first if I could release the [data](http://maps.startigt.net/dump/github.tgz) with the [code](https://github.com/franckcuny/StarGit) and the poster, and the anwser is yes! So if you're intereseted, you can download it. +All the data are available! Last year I got some mails asking me for the dataset. So this time I asked first if I could release the [data](http://maps.startigt.net/dump/github.tgz) with the [code](http://git.lumberjaph.net/p5-stargit.git/) and the poster, and the anwser is yes! So if you're intereseted, you can download it. The data are stored in mongodb, so I provide the dump which you can easily use: @@ -28,7 +28,7 @@ The data are stored in mongodb, so I provide the dump which you can easily use: {% endhighlight %} Now you can use mongodb to browse the imported database. There is 5 collections: profiles / repositories / relations / contributions / edges. - + ## Methodology Last year I did a simple "follower/following" graph. It was already interesting, but it was also *really* too simple. This time I wanted to go deeper in the exploration. @@ -69,7 +69,7 @@ I've collected: * 40 807 repositories This took me about a month in order to collect the data and to build the adapted tools. - + ### Accounts creations The following chart show the number of account created by month. "Everyone" means the total of accounts created. You can also see the numbers for each communities. @@ -79,9 +79,9 @@ On the "Everyone" graph, you can see a huge pick around April 2008, that's the d For most of the communities, the number of created accounts start to decrease since 2010. I think the reason is that most of the developers from those communities are now on GitHub. <script language="javascript" type="text/javascript" src="/static/js/jquery.js"></script> -<script language="javascript" type="text/javascript" src="/static/js/jquery.flot.js"></script> +<script language="javascript" type="text/javascript" src="/static/js/jquery.flot.js"></script> -<div id="placeholder" style="width:800px;height:300px;"></div> +<div id="placeholder" style="width:800px;height:300px;"></div> <ul class="actions"> <li class="minibutton"><input class="fetchSeries" type="button" value="Everyone" href="/static/json/global.json"></li> @@ -97,7 +97,7 @@ For most of the communities, the number of created accounts start to decrease si <li class="minibutton"><input class="resetSeries" type="button" value="reset"></li> </ul> -<script type="text/javascript"> +<script type="text/javascript"> $(function () { var options = { lines: { show: true }, @@ -106,9 +106,9 @@ $(function () { }; var data = []; var placeholder = $("#placeholder"); - + $.plot(placeholder, data, options); - + // fetch one series, adding to what we got var alreadyFetched = {}; @@ -117,29 +117,29 @@ $(function () { data = []; $.plot(placeholder, data, options); }); - + $("input.fetchSeries").click(function () { var button = $(this); - - // find the URL in the link right next to us + + // find the URL in the link right next to us var dataurl = button.attr('href'); - + // then fetch the data with jQuery function onDataReceived(series) { // extract the first coordinate pair so you can see that // data is now an ordinary Javascript object var firstcoordinate = '(' + series.data[0][0] + ', ' + series.data[0][1] + ')'; - + // let's add it to our current data if (!alreadyFetched[series.label]) { alreadyFetched[series.label] = true; data.push(series); } - + // and plot all we got $.plot(placeholder, data, options); } - + $.ajax({ url: dataurl, method: 'GET', @@ -148,7 +148,7 @@ $(function () { }); }); }); -</script> +</script> ### Languages @@ -252,7 +252,7 @@ This one is really nice. We can clearly see all the communities. There is someth * Python and Perl are also opposed (Perl at the bottom and Python at the top) I'll let you take some conclusion by yourself on this one ;) - + ## France (706 nodes, 1059 edges) ([download PDF](http://maps.stargit.net/france/france.pdf), [download GDF](http://maps.stargit.net/france/france.gdf), [download GEXF](http://maps.stargit.net/france/france.gexf)) @@ -269,8 +269,8 @@ There is three dominants clusters on this one: * Perl * C -The Ruby and Perl one are well connected. There is a lot of japanese hacker on CPAN using both languages. - +The Ruby and Perl one are well connected. There is a lot of japanese hacker on CPAN using both languages. + ## StarGit [StarGit](http://stargit.net) is a great tool we built with Alexis to let you explore **your** community on GitHub. You can read more about the application on [Alexis' blog](http://ofnodesandedges.com/2011/06/20/stargit.html). @@ -279,8 +279,6 @@ It's hosted on [dotcloud](http://dotcloud.com) (I'm still amazed at how easy it ## Credits -I would like to thanks the whole GitHub team for being interested in the previous poster and to ask another one this year :) +I would like to thanks the whole GitHub team for being interested in the previous poster and to ask another one this year :) A **huge** thanks to Alexis for his help on building the awesome StarGit. Another big thanks to Antonin for his work on the poster. - - diff --git a/_posts/2012-02-17-HTTP_requests_with_python.md b/_posts/2012-02-17-HTTP_requests_with_python.md index f3cbabb..a5aeafb 100644 --- a/_posts/2012-02-17-HTTP_requests_with_python.md +++ b/_posts/2012-02-17-HTTP_requests_with_python.md @@ -28,7 +28,7 @@ There is also an important issue with httplib2 that we discovered at work. In so [urllib](http://docs.python.org/library/urllib.html) is also part of the standard library. I was suprised, because given the name, I was expecting a lib to *manipulate* an URL. And indeed, it also does that! This library mix too many different things. -### urllib2 +### urllib2 [urllib2](http://docs.python.org/library/urllib2.html) And because 2 is not enough, also ... @@ -66,9 +66,9 @@ The response and request objects use HTTP::Headers and HTTP::Cookies. This way, ## http -So now you start seeing where I'm going. And you're saying "ho no, don't tell me you're writing *another* HTTP library". Hell yeah, I am (sorry, Masa). But to be honest, I doubt you'll ever use it. It's doing the job *I* want, the way *I* want. And it's probably not what you're expecting. +So now you start seeing where I'm going. And you're saying "ho no, don't tell me you're writing *another* HTTP library". Hell yeah, I am (sorry, Masa). But to be honest, I doubt you'll ever use it. It's doing the job *I* want, the way *I* want. And it's probably not what you're expecting. -[http](https://github.com/franckcuny/httpclient/) is providing an abstraction for the following things: +[http](http://git.lumberjaph.net/py-http.git/) is providing an abstraction for the following things: * http.headers * http.request @@ -94,8 +94,8 @@ http://lumberjaph.net >>> r.headers.add('Content-Type', 'application/json') >>> print r.headers Content-Type: application/json - - + + >>> {% endhighlight %} @@ -103,19 +103,19 @@ Content-Type: application/json >>> from http import Headers >>> h = Headers() >>> print h - - + + >>> h.add('X-Foo', 'bar') >>> h.add('X-Bar', 'baz', 'foobarbaz') >>> print h X-Foo: bar X-Bar: baz X-Bar: foobarbaz - - + + >>> for h in h.items(): ... print h -... +... ('X-Foo', 'bar') ('X-Bar', 'baz') ('X-Bar', 'foobarbaz') @@ -126,6 +126,6 @@ X-Bar: foobarbaz With this, you can easily build a very simple client combining thoses classes, or a more complex one. Or maybe you want to build a web framework, or a framework to test HTTP stuff, and you need a class to manipulate HTTP headers. Then you can use http.headers. The same if you need to create some HTTP responses: http.response. -I've started to write [httpclient](https://github.com/franckcuny/httpclient/) based on this library that will mimic LWP's API. +I've started to write [httpclient](http://git.lumberjaph.net/py-httpclient.git/) based on this library that will mimic LWP's API. I've started [to document this library](http://httpclient.readthedocs.org/en/latest/index.html) and I hope to put something on PyPI soon. |
