Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I didn't say it was uncommon, just that it's a bad idea.

There's no need whatsoever for a separate client API. There could be a convention like:

  from csvbase import loader as csvloader
  df = pd.read_csv(csvloader("calpaterson/onion-vox-pops"))
The user wouldn't have to know anything but what to import to fetch a certain thing, and it's explicit about what's coming from there. There's also less risk of mistyping the URL string ("oops, I just typed cvsbase and accidentally loaded a list of CVS drugstores"), and code completion can tell you that csvloader() fetches things through the csvbase module.

Cons:

- It takes 5 seconds longer to type, one time.

Pros:

- You can tell what the code does at a glance.



Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: