File: myjsonlines.py

package info (click to toggle)
python-cloudflare 2.20.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,048 kB
  • sloc: python: 6,932; makefile: 138; sh: 76
file content (19 lines) | stat: -rw-r--r-- 483 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
""" helper functions for jsonlines usage """

class myjsonlines():
    """ myjsonlines """

    _jsonlines = None

    def __init__(self):
        """ __init__ """
        if not myjsonlines._jsonlines:
            try:
                import jsonlines
                myjsonlines._jsonlines = jsonlines
            except ImportError as e:
                raise ImportError from e

    def Writer(self, fd):
        """ Writer() """
        return myjsonlines._jsonlines.Writer(fd)