Coverage for src/usaspending/__init__.py: 100%
11 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-03 17:15 -0700
« prev ^ index » next coverage.py v7.10.6, created at 2025-09-03 17:15 -0700
1"""USASpending Python Wrapper - Simplified access to federal award data.
3An opinionated Python client for the USAspending.gov API that simplifies
4access to federal spending data through intuitive interfaces and smart defaults.
5"""
7from __future__ import annotations
9# Version information
10__version__ = "0.4.0"
11__author__ = "Casey Dreier"
12__email__ = "casey.dreier@planetary.org"
14# Core client and configuration
15from .client import USASpending
16from .config import config
18# Exception classes for error handling
19from .exceptions import (
20 USASpendingError,
21 APIError,
22 HTTPError,
23 RateLimitError,
24 ValidationError,
25 ConfigurationError,
26 DownloadError,
27)
29# Model classes
30from .models import (
31 Award,
32 Contract,
33 Grant,
34 IDV,
35 Loan,
36 Transaction,
37 Recipient,
38 Agency,
39 Location,
40 PeriodOfPerformance,
41 SubAward,
42)
44# Query builder classes
45from .queries import (
46 AwardsSearch,
47 TransactionsSearch,
48 SpendingSearch,
49 FundingSearch,
50 SubAwardsSearch,
51)
53# Filter classes for building queries
54from .queries.filters import (
55 AgencyFilter,
56 AwardAmountFilter,
57 KeywordsFilter,
58 LocationSpec,
59 LocationFilter,
60 LocationScopeFilter,
61 TimePeriodFilter,
62 TreasuryAccountComponentsFilter,
63)
65# Public API exports
66__all__ = [
67 # Version info
68 "__version__",
69 "__author__",
70 "__email__",
71 # Core
72 "USASpending",
73 "config",
74 # Exceptions
75 "USASpendingError",
76 "APIError",
77 "HTTPError",
78 "RateLimitError",
79 "ValidationError",
80 "ConfigurationError",
81 "DownloadError",
82 # Models
83 "Award",
84 "Contract",
85 "Grant",
86 "IDV",
87 "Loan",
88 "Transaction",
89 "Recipient",
90 "Agency",
91 "Location",
92 "PeriodOfPerformance",
93 "SubAward",
94 # Query builders
95 "AwardsSearch",
96 "TransactionsSearch",
97 "SpendingSearch",
98 "FundingSearch",
99 "SubAwardsSearch",
100 # Filters
101 "AgencyFilter",
102 "AwardAmountFilter",
103 "KeywordsFilter",
104 "LocationSpec",
105 "LocationFilter",
106 "LocationScopeFilter",
107 "TimePeriodFilter",
108 "TreasuryAccountComponentsFilter",
109]