Skip to main content

Python FogBugz API Wrapper

This Python API is simply a wrapper around the FogBugz API, with some help from Leonard Richardson’s BeautifulSoup (http://www.crummy.com/software/BeautifulSoup/) and the magic of Python’s __getattr__().

Getting Started:

To use the FogBugz API, install the package either by downloading the source and running

$ python setup.py install

or by using pip

$ pip install fogbugz

A Quick Example:

>>> from fogbugz import FogBugz
>>> fb = FogBugz("http://example.fogbugz.com/") # URL is to your FogBugz install
>>> fb.logon("logon@example.com", "password")
>>> resp = fb.search(q="assignedto:tyler") # All calls take named parameters, per the API
>>> resp # Responses are BeautifulSoup objects of the response XML.
<response><cases count="2"><case ixbug="1" operations="edit,assign,resolve,email,remind"></case><case ixbug="2" operations="edit,spam,assign,resolve,reply,forward,remind"></case></cases></response>
>>> # You shouldn't need to know too much about BeautifulSoup, but the documentation can be found here:
>>> # http://www.crummy.com/software/BeautifulSoup/documentation.html
>>> for case in resp.cases.childGenerator(): # One way to access the cases
...     print case['ixbug']
...
1
2
>>> for case in resp.findAll('case'): # Another way to access the cases
...     print case['operations']
...
edit,assign,resolve,email,remind
edit,spam,assign,resolve,reply,forward,remind
>>> resp = fb.edit(ixbug=1, sEvent="Edit from the API") # Note the named parameters
>>> resp
<response><case ixbug="1" operations="edit,assign,resolve,email,remind"></case></response>

Note that, per API v5.0, all data between tags, such as the token, is now wrapped in CDATA. BeautifulSoup’s implementation of CData generally allows for it to be treated as a string, except for one important case: CData.__str__() (a.k.a. str(CData)) returns the full text, including the CDATA wrapper (e.g. “<![CDATA[foo]]>”). To avoid accidentally including the CDATA tage, use CData.encode(‘utf-8’)

Additional Details:

If your script requires a certain version of the FogBugz API, make sure to pass it as an argument to the constructor. This will protect you from unexpected differences should we make backwards-incompatible changes.

>>> from fogbugz import FogBugz
>>> fb = FogBugz("http://example.fogbugz.com", api_version=5)

For more info on the API: http://help.fogcreek.com/the-fogbugz-api

Much of the API has not been thoroughly tested. Please report bugs to customer-service@fogcreek.com

fogbugz_bis is a fork of the FogCreek codebase to support Python 3 and BeautifulSoup 4. You should install/require only one of fogbugz or fogbugz_bis as they both implement the same module.

Metadata

Release files for fogbugz 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fogbugz 1.0.6
File Size Uploaded Provenance
fogbugz-1.0.6.tar.gz 7.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for fogbugz 1.0.6
File Interpreter ABI Platform
fogbugz-1.0.6-py2-none-any.whl Python 2 none any Details

Total release size: 16.2 kB

Release files / fogbugz-1.0.6.tar.gz

Download URL fogbugz-1.0.6.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
e25413ebc15a29b9f56c67e53340c1e93e56f4b5779557c855d497e3cbc15fdc
BLAKE2b-256 checksum
How to use checksums
9cb912fa0b0708c9b52a1a3ac0416c76e3d466d01a7e65305a5d4a714bb1e873
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / fogbugz-1.0.6-py2-none-any.whl

Download URL fogbugz-1.0.6-py2-none-any.whl
Size 8.5 kB
Tags Python 2
SHA-256 checksum
How to use checksums
1b0d3058b01599d009c5b9d0b8e81ccb73b9dfe28f4583740232a07f0517f479
BLAKE2b-256 checksum
How to use checksums
dd1f13e24f3e5f434b2dd28c7652192609f4c56cd2c980228d4312e6e344294b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for fogbugz 1.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page