Skip to content
Terry Carroll edited this page Aug 7, 2014 · 26 revisions

Plumage

Summary

Plumage is a library to obtain trademark status information from the United States Patent & Trademark Office's (PTO) Trademark Status & Document Retrieval (TSDR) system. It fetches XML data from the PTO's TSDR website, parses it into a set of key/value pairs via XSLT, and converts the key/value pairs into a dictionary.

Plumage is currently implemented in Python (Plumage-py), using lxml (a prerequisite) for XSLT; and in .NET, using C# (Plumage-dotnet). I plan to additionally implement it in Java.

##Examples ###Python example

from Plumage import plumage
t = plumage.TSDRReq()
t.getTSDRInfo("2564831", "r")   # get info on reg. no 2,564,831
if t.TSDRMapIsValid:
   print "Application serial no: ", t.TSDRMap["ApplicationNumber"]
   print "Trademark text: ", t.TSDRMap["MarkVerbalElementText"]
   print "Application filing date: ", t.TSDRMap["ApplicationDate"]
   print "Registration no: ", t.TSDRMap["RegistrationNumber"]
   print "Status: ", t.TSDRMap["MarkCurrentStatusExternalDescriptionText"]
   # Owner info is in most recent (0th) entry in ApplicantList
   current_owner_info = t.TSDRMap["ApplicantList"][0]
   print "Owner:", current_owner_info["ApplicantName"]
   print "Owner address: ", current_owner_info["ApplicantCombinedAddress"]

###C# example

Plumage.TSDRReq t = new Plumage.TSDRReq();
t.getTSDRInfo("2564831", "r");  // get info on reg. no 2,564,831
if (t.TSDRMapIsValid){
    Console.WriteLine("Application serial no: " + t.TSDRMap["ApplicationNumber"]);
    Console.WriteLine("Trademark text: " + t.TSDRMap["MarkVerbalElementText"]);
    Console.WriteLine("Application filing date: " + t.TSDRMap["ApplicationDate"]);
    Console.WriteLine("Registration no: " + t.TSDRMap["RegistrationNumber"]);
    Console.WriteLine("Status: " + t.TSDRMap["MarkCurrentStatusExternalDescriptionText"]);
    // Owner info is in most recent (0th) entry in ApplicantList
    ArrayList applicant_list = (ArrayList)t.TSDRMap["ApplicantList"];
    Dictionary<string, Object> current_owner_info = (Dictionary<string, Object>)applicant_list[0];
    Console.WriteLine("Owner: " + current_owner_info["ApplicantName"]);
    Console.WriteLine("Owner address: " + current_owner_info["ApplicantCombinedAddress"]);

###Visual Basic.net example Because Plumage is a .NET library, although coded in C#, it can be invoked from other .NET languages, e.g. Visual Basic.net:

VB.net example goes here

###Sample output In either case, this will print:

Application serial no:  75181334
Trademark text:  MONTY PYTHON'S FLYING CIRCUS
Application filing date:  1996-10-15-04:00
Registration no:  2564831
Status:  Registration cancelled because registrant did not file an acceptable de
claration under Section 8.  To view all documents in this file, click on the Tra
demark Document Retrieval link at the top of this page.
Owner: Python (Monty) Pictures Ltd.
Owner address:  Room 537/538, The Linen Hall//London//W1R 5TB/GB

#Licenses *ASL V2.0 (code) *CC BY-SA 3.0 (documentation)

See the page License Information for license details.