Title: Avoid using global state · Issue #26 · cloudconvert/cloudconvert-python · GitHub
Open Graph Title: Avoid using global state · Issue #26 · cloudconvert/cloudconvert-python
X Title: Avoid using global state · Issue #26 · cloudconvert/cloudconvert-python
Description: Please consider using standard OOP patterns as it's common for such libraries instead of relying on global state. Nothing wrong with providing some convenience utils that rely on a global client, but developers who want to nicely encapsu...
Open Graph Description: Please consider using standard OOP patterns as it's common for such libraries instead of relying on global state. Nothing wrong with providing some convenience utils that rely on a global client, b...
X Description: Please consider using standard OOP patterns as it's common for such libraries instead of relying on global state. Nothing wrong with providing some convenience utils that rely on a global clien...
Opengraph URL: https://github.com/cloudconvert/cloudconvert-python/issues/26
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Avoid using global state","articleBody":"Please consider using standard OOP patterns as it's common for such libraries instead of relying on global state.\r\nNothing wrong with providing some convenience utils that rely on a global client, but developers who want to nicely encapsulate things should not be required to deal with global state.\r\n\r\nA nice API would be something like this:\r\n\r\n```python\r\ncconvert = CloudConvertClient(api_key=..., sandbox=...)\r\ncconvert.foo()\r\n```\r\n\r\nI think #13 and #24 are both about issues which are implicitly caused by the current design.\r\n\r\nFor a commercial product (albeit at very decent pricing, so nothing wrong with that!) I also find the lack of activity on this repo (and issues) a bit worrying TBH. Can we assume that your infrastructure is better maintained than the client libraries? I'd hope so but you never know... ;)","author":{"url":"https://github.com/ThiefMaster","@type":"Person","name":"ThiefMaster"},"datePublished":"2022-11-02T14:51:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":2},"url":"https://github.com/26/cloudconvert-python/issues/26"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:601a2c50-8f22-ac87-8d1f-7bce19f32ffd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C09A:243FA0:F1179A:13AE79C:69742321 |
| html-safe-nonce | aa2080dc7f522755d53a338416a95cfc16335af89ac7dcaf0a9c3c101fefd4af |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDMDlBOjI0M0ZBMDpGMTE3OUE6MTNBRTc5Qzo2OTc0MjMyMSIsInZpc2l0b3JfaWQiOiIxMTg0MTMwMTA0NTQ4NDAxOTU0IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9097e1451c83c513b299e5b29cf2e3fa63a11e1815af5b1cb17a5b3d3ae54e1e |
| hovercard-subject-tag | issue:1433285629 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/cloudconvert/cloudconvert-python/26/issue_layout |
| twitter:image | https://opengraph.githubassets.com/1b28b58f5d2a2095c20ea45d489f077d3ca8ad3dd9d4b8cfa74a84e3b6a2d830/cloudconvert/cloudconvert-python/issues/26 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/1b28b58f5d2a2095c20ea45d489f077d3ca8ad3dd9d4b8cfa74a84e3b6a2d830/cloudconvert/cloudconvert-python/issues/26 |
| og:image:alt | Please consider using standard OOP patterns as it's common for such libraries instead of relying on global state. Nothing wrong with providing some convenience utils that rely on a global client, b... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ThiefMaster |
| hostname | github.com |
| expected-hostname | github.com |
| None | 447dc9917c3d68d647a01abfdefe55ec7ee1785922136c1d8395dbb3ab6d57b9 |
| turbo-cache-control | no-preview |
| go-import | github.com/cloudconvert/cloudconvert-python git https://github.com/cloudconvert/cloudconvert-python.git |
| octolytics-dimension-user_id | 11375343 |
| octolytics-dimension-user_login | cloudconvert |
| octolytics-dimension-repository_id | 46970294 |
| octolytics-dimension-repository_nwo | cloudconvert/cloudconvert-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 46970294 |
| octolytics-dimension-repository_network_root_nwo | cloudconvert/cloudconvert-python |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8dad7bdfecbe3eaa97ac4e632d6b47e2b23e81d9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width