This is a bit techy, but since we provide the source code for all of our modules, you'll get a lot of info in the javadoc for Usps.java which I've pasted below, but unfortunately has lost the formatting

Note that there is also a USPS international module for international shipping with USPS.
Javadoc:
This shipping module communicates with USPS to retrieve shipping rates. Using the Admin App you must set up the following configuration variables: USPS Module:
USPS User Id which you need to receive from USPS
Request URL (production:
http://production.shippingapis.com/ShippingAPI.dll)
USPS Service code. This is the code for the service that you want. Valid codes are:
ALL - Returns all available rates
FIRST CLASS
PRIORITY
PRIORITY COMMERCIAL
EXPRESS
EXPRESS SH
EXPRESS HFP
EXPRESS COMMERCIAL
EXPRESS SH COMMERCIAL
EXPRESS HFP COMMERCIAL
PARCEL POST
BPM
MEDIA MAIL
LIBRARY MAIL
USPS Service codes to exclude. You could ask for all rates but decide to exclude certain ones. The excluded rates are defined by comma separated codes. The codes are:
0 First-Class
1 Priority Mail
2 Express Mail Hold for Pickup
3 Express Mail PO to Addressee
4 Parcel Post
5 Bound Printed Matter
6 Media Mail
7 Library
12 First-Class Postcard Stamped
13 Express Mail Flat-Rate Envelope
16 Priority Mail Flat-Rate Envelope
17 Priority Mail Flat-Rate Box
18 Priority Mail Keys and IDs
19 First-Class Keys and IDs
22 Priority Mail Flat-Rate Large Box
23 Express Mail Sunday/Holiday
25 Express Mail Flat-Rate Envelope Sunday/Holiday
27 Express Mail Flat-Rate Envelope Hold For Pickup
Size by weight. For many of the rates, UPS requires a size to be specified. Valid values are:
REGULAR
LARGE
OVERSIZE
This configuration variable allows you to specify different sizes based on the weight of the delivery. The formatting should look something like this: 10:REGULAR,25:LARGE,71:OVERSIZE which means that a REGULAR size is used from 0 to 9lbs, a LARGE size from 10lbs to 24lbs and an OVERSIZE size from 25lbs to 70lbs.
Container Type defines the type of container used for the package. Valid values are:
RECTANGULAR
NONRECTANGULAR
LG FLAT RATE BOX
FLAT RATE BOX
FLAT RATE ENV.
LG FLAT RATE BOX
VARIABLE
Machinable Package can be set to true or false. The USPS definitions for machinable can be found here:
http://pe.usps.com/text/dmm300/101.htmWhen First Class is selected, the package must be LETTER, FLAT or PARCEL.
Handling fee : Defaults to 0. It is added to the charge returned by USPS.
Shipping and Packaging under Configuration
Country of Origin : Country from which packages will be shipped.
Postal Code : Postal code of area from which packages will be shipped
Maximum package weight : This is used to split the order into multiple packages . We make multiple calls to USPS and sum the costs to create a total.
Package tare weight : This is added to the weight of the items being shipped per package