Skip to content

Update API key requirement for May 12, 2026 Census update and add error for users.#166

Open
peterrrock2 wants to merge 3 commits into
datamade:masterfrom
peterrrock2:master
Open

Update API key requirement for May 12, 2026 Census update and add error for users.#166
peterrrock2 wants to merge 3 commits into
datamade:masterfrom
peterrrock2:master

Conversation

@peterrrock2
Copy link
Copy Markdown

@peterrrock2 peterrrock2 commented May 12, 2026

Hey! Just adding this here in case it helps. Please let me know if there is a better branch to open this PR against (I didn't see any notes on contributing that specified).

This is a quick patch to a bug flagged in #165. As of today, the US Census Bureau now requires all requests made against its API carry an API key. But when calling

census = Census(key="<API_KEY>")

the API key was not always forwarded to requests. This PR adds modifies the _field_type cache to add in the API key and adds a warning to users that the key is now required.

This also patches the fields and tables requests and adds a test to make sure that you have passed an API key to the Client.

@pedrocamargo
Copy link
Copy Markdown

This looks good. I guess @jcarbaugh would need to merge and make a new release now.

@jcarbaugh
Copy link
Copy Markdown
Contributor

@pedrocamargo DataMade fully owns the package now and are the maintainers on PyPI too

@pedrocamargo
Copy link
Copy Markdown

A job for @hancush or @derekeder , then?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants