Skip to content

Allow to use ijson package by a relative import #93

@prrvchr

Description

@prrvchr

Hi,

I am using ijson package to stream json data coming from Request API.

I do this in a LibreOffice/OpenOffice extension (a file with the oxt extension) in which is a copy of the ijson package.

In order to remain independent of the system on which this extension is installed, I try if possible to use relative imports on my necessary python packages.
This is only possible if the python package you are trying to import also only uses relative imports.

This mode of use brings several improvements:

  • This makes it possible to be sure to always have the same version regardless of the versions already installed on the host system.
  • This allows you to embed the package in a python program without necessarily having to install the package at the system python level.
  • This allows the use of the package without it being installed in the PYTHONPATH.
  • It allows version management.

I only see advantages in it, and it should normally also work with Python version 2.7, and in fact the changes are minimal, they are visible on this link.

Anyway thanks again for your API.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions