Python Server Coding Problems!

Balaji MJ
1 min readOct 9, 2021

Making Requests to remote server

How would you make a requests to remote service using python!

How would you parse an Json file!

How would your parse an YML File?

Check this code snippet.

How would you open a file in writing and reading mode in Python?

Threading model in Python?

This is a case where threading is used as a simple optimization method: each subthread is waiting for a URL to resolve and respond, to put the contents back on the queue and each thread is a daemon.

The main thread starts with all subthreads, that does a get on the queue to wait until one of them has done a put, then it emits the results and terminates.

Proper use of threads in Python is invariably connected to I/O operations Queues are the way to frame out the work to threads and/or collect the work’s results, by the way, and they are intrinsically thread safe.

How to get all the list of running processes and sorting them by highest memory usage in Python?

By using psutil library!

That’s all folks!

--

--

Balaji MJ

I write about Software Engineering, Backend Development, Algorithmic Trading, Quantitative Finance, and our Mind and Universe.