pyLinkwarden package

Submodules

pyLinkwarden.api module

class pyLinkwarden.api.Client(endpoint, access_token=None)[source]

Bases: object

Interacts with Linkwarden’s API

pyLinkwarden.content module

class pyLinkwarden.content.Collections(client)[source]

Bases: object

_get()[source]

Returns JSON of collections endpoint response.

Returns:

JSON of link data

_get_raw()[source]

Returns entirety of collections endpoint response.

Returns:

Requests library response object

delete(collection_id)[source]

Deletes a collection

Parameters:

collection_id – Id of collection you wish to delete

Returns:

Requests library response object

list()[source]

Returns list of collections

Returns:

List of collections

Bases: object

_get(link_id=None, specific_attribute=None)[source]

Returns JSON of links endpoint response. Returns all links if link_id is not specified. Otherwise, returns the specific link.

Parameters:
  • link_id – Id of the link that you wish to view. Optional.

  • specific_attribute – Returns the value of this attribute. Optional.

Returns:

JSON of link data or the specific attribute’s value.

_get_raw(link_id=None)[source]

Returns entirety of links endpoint response. Returns all links if link_id not specified. Otherwise, returns specific link.

Parameters:

link_id – Id of link that you wish to view. Optional.

Returns:

Requests library response object

check_if_url_exists(url)[source]

Checks to see if the provided URL already exists.

Parameters:

url – URL of page

Returns:

True if page exists, False if page does not exist.

delete(link_id)[source]

Deletes a link

Parameters:

link_id – Id of link you wish to delete

Returns:

Requests library response object

list()[source]

Returns list of links

Returns:

List of titles of links.

list_all_urls()[source]

Lists all URLs in Linkwarden.

Returns:

List of URLs

class pyLinkwarden.content.Tags(client)[source]

Bases: object

_get()[source]

Returns JSON of tags endpoint response.

Returns:

JSON of link data

_get_raw()[source]

Returns entirety of tags endpoint response.

Returns:

Requests library response object

delete(tag_id)[source]

Deletes a tag

Parameters:

tag_id – Id of tag you wish to delete

Returns:

Requests library response object

list()[source]

Returns list of tags

Returns:

List of tags

rename(tag_id, new_name)[source]

Renames a tag

Parameters:
  • tag_id – Id of tag you wish to rename

  • new_name – New name for tag to be renamed to

Returns:

Requests library response object

Module contents