question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Improve the structure of this lib

See original GitHub issue

This is my idea about how it can be improved:

  1. Get rid of global. This is not Pythonic. It may be useful for ad-hoc automation script, but for a serious, well-structured library, uhm, no.

  2. Let accept server URL as input, so that the lib can be used with SUSI server installed anywhere. We have these URLs hardcoded: https://api.susi.ai, http://localhost:4000/, but we should treat them as “default” value. Actually, when we make server URL customizable, we only need 1 default value, either https://api.susi.ai or http://localhost:4000/.

  3. If we can, let’s make this lib “sans-IO”, i.e, the lib won’t do the job of receiving, sending data (over network), it only takes care of parsing, combining data. With this approach, our lib can be used both in synchronous code (where requests is often used for transporting) and asyncio code (where aiohttp is used for transporting). List of sans-io libs as reference: https://github.com/brettcannon/sans-io/blob/master/index.rst

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
norbusancommented, May 24, 2019

I think 1 and 2 are relatively easy and can be implemented without big interruption.

3 sounds a bit more complicated, though, since it requires adaptions of susi_linux interaction, I guess.

I vote for getting 1 and 2 done soon!

0reactions
hongquancommented, Jun 1, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Make Your Library Great - Project for Public Spaces
A surefire strategy for libraries is providing a series of smaller "places" within and around them to attract people. These attractions don't need...
Read more >
Education Research: How Do We Improve Libraries?
This is just one way library design can be improved, but further research into exactly why current libraries are not adequately serving ...
Read more >
Library Space Planning | Opening the Book
Opening the Book can carry out a visual audit of your spaces and make recommendations of small and large changes to improve the...
Read more >
Improve overall OpenSSL library structure #13440 - GitHub
The OpenSSL code has essentially a three-level structure with a stack of two libraries and a command-line application at the top: openssl apps ......
Read more >
Best practices for designing the document library structure
The best way to design the FileHold document library structure is to have a small library structure, even when the number of documents...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found