semvec/pypi-packages huggingface dataset:
giant-social-links 0.1.1
A small reuseable django app that allows social media links to be added via the admin.
License: MIT
Requires Python: >=3.9,<4.0
Keywords: giant_social_links,app

# giant-social-links

A small reuseable django app that allows social media links to be added via the admin page of your django site.

This will include the basic formatting and functionality such as model creation via the admin.

Supported Django versions:

    Django 2.2, 3.2

Supported django CMS versions:

    django CMS 3.8, 3.9

## Installation and set up

In the INSTALLED_APPS of your settings file add "giant_social_links" and below "cms" ensure "easy_thumbnails" and "filer" are present. It is also required that you use the giant-plugins & giant-mixins apps.

A context processor is given by default so your Social links can be accessed anywhere on the site by rendering the template variable:

    {{ social_media_links }}

Which will only show the enabled links. Feel free to override this with a custom context processor.

# Local development
## Getting setup

To get started with local development of this library, you will need access to poetry (or another venv manager). You can set up a virtual environment with poetry by running:

    $ poetry shell

Note: You can update which version of python poetry will use for the virtualenv by using:

    $ poetry env use 3.x

and install all the required dependencies (seen in the pyproject.toml file) with:

    $ poetry install

## Management commands

As the library does not come with a manage.py file we need to use django-admin instead. However, we will need to set our DJANGO_SETTINGS_MODULE file in the environment. You can do this with:

    $ export DJANGO_SETTINGS_MODULE=settings

From here you can run all the standard Django management commands such as django-admin makemigrations.
Testing

This library uses Pytest in order to run its tests. You can do this (inside the shell) by running:

    $ pytest -v

where -v is to run in verbose mode which, while not necessary, will show which tests errored/failed/passed a bit more clearly.
Preparing for release

In order to prep the package for a new release on TestPyPi and PyPi there is one key thing that you need to do. You need to update the version number in the pyproject.toml. This is so that the package can be published without running into version number conflicts. The version numbering must also follow the Semantic Version rules which can be found here https://semver.org/.
# Publishing

Publishing a package with poetry is incredibly easy. Once you have checked that the version number has been updated (not the same as a previous version) then you only need to run two commands.

    $ `poetry build`

will package the project up for you into a way that can be published.

    $ `poetry publish`

will publish the package to PyPi. You will need to enter the company username (Giant-Digital) and password for the account which can be found in the company password manager
terminalpyth 2.1.0
Terminal extension for python
License: MIT

# TerminalPyth

### Library that allows you to call terminal commands in python whithout discarding director changes (unlike os.system() method does).

## `Installation:`

    $ pip install terminalpyth

## `Usage:`

    import terminalpy

Create a terminalpy object. Pass True or False as argument if you want (or not) to have back the output.

    trm = terminalpy.Terminal(output=True)

Only one straight-forward method: type. Pass inside it the command you want to be executed.

    output = trm.type('pwd')

    # in this case, returns path to the current directory,
    # which in this case is stored in "output"

It works with pretty much every terminal command. 

To use "sudo", if you are not in a terminal session itself, you must add the "-S" option, 
to read the password from IDE (e.g. Pycharm).

    trm.clear()

This command clears the memory of the directory changes, returning back to the project foler.

    trm.setOutput(output=False)

Changes the state of the return action. If "False", there will be no return value, otherwise there will. \
The method allows to change the state during the session.

## `Example:`

Imagine a basic directory tree:

    - home
        - python
            - project1
                - main.py
            - prokect2
                - main2.py
        - cpp
            - project3
                
This is the difference between TerminalPyth and os, receiving the same exact instructions:

    # /home/python/project1/main.py
    import terminalpy as tp
    
    term = tp.Terminal(output=True)
    
    path = term.type('pwd')
    print(path)
    # output: /home/python/project1

    term.type('cd ..')
    print(term.type('ls')
    # output:   project1
    #           project2

    term.type('cd ..')
    term.type('cd cpp')
    print(term.type('pwd'))
    # output: /home/cpp

    term.clear()
    print(term.type('pwd'))
    # output: /home/python/project1

    --------------------------------

    # /home/python/project2/main2.py
    import os

    os.system('pwd')
    # output: /home/python/project2

    os.system('cd ..')
    os.system('ls')
    # output: main2.py

    os.system('cd ..')
    os.system('cd c++') # Error: The directory 'cpp' does not exist
    os.system('pwd')
    # output: /home/python/project2


The main differences between TerminalPyth and os.system(): \
    - TerminalPyth allows multiple direcotry changes \
    - TerminalPyth allows to store the output in a variable \
    - TerminalPyth lets you chose if return the output or not \
    - os.system() prints its output always, in any case \
    - os.system() doesn't allow to store the output \
    - os.system() doesn't allow multiple directory change