semvec/pypi-packages huggingface dataset:
SassPython 0.2.1
binding for libsass
License: MIT License

SassPython - bindings for libsass
=================================

why?
----

* the guy on this talk asqued for it: http://www.confreaks.com/videos/859-railsconf2012-the-future-of-sass
* I wanted to play with ctypes

who?
----

marianoguerra

how?
----

first of all download, compile and install libsass::

        git clone https://github.com/hcatlin/libsass.git
        cd libsass
        ./configure
        make
        sudo make install

then you can play with this project in two ways

command line
............

if no options provided read from stdin::

        ➜  src  ./sass.py                           
        table.hl td.ln {
          text-align: right;
        }

        table.hl td.ln {
          text-align: right; }

from a file::

        ➜  src  ./sass.py -f ../examples/simple.scss

        .content-navigation {
          border-color: #3bbfce;
          color: darken(#3bbfce, 9%); }

        .border {
          padding: 8px;
          margin: 8px;
          border-color: #3bbfce; }

from a folder:

.. image:: http://chzscience.files.wordpress.com/2011/11/funny-science-news-experiments-memes-dog-science-fuzzy-logic.jpg

::

        # I think it doesn't work, never used sass before and don't know what
        # this means :)
        ➜  src  ./sass.py -d ../examples/

you can't chew gum and walk at the same time::

        ➜  src  ./sass.py -f ../examples/simple.scss -d ~
        usage: sass.py [-h] [-f FILE_PATH | -d DIR_PATH]
        sass.py: error: argument -d/--dir: not allowed with argument -f/--file

code
....

from a string::

        Python 2.7.3 (default, Apr 20 2012, 22:44:07) 

        >>> import sass
        >>> STYLE = """
        ... table.hl td.ln {
        ...   text-align: right;
        ... }
        ... """

        >>> ok, style = sass.compile(STYLE)

        >>> ok
        True

        >>> print style
        table.hl td.ln {
          text-align: right; }

from a file::

        >>> ok, style = sass.compile_path("../examples/simple.scss")

        >>> ok
        True

        >>> print style
        .content-navigation {
          border-color: #3bbfce;
          color: darken(#3bbfce, 9%); }

        .border {
          padding: 8px;
          margin: 8px;
          border-color: #3bbfce; }

from a folder::

        >>> ok, style = sass.compile_folder("../examples/")
        
        # ???
        # Profit!

how to install?
---------------

from sources
............

python 2::

        sudo python2 setup.py install

python 3::

        sudo python3 setup.py install

using pip
.........

::

        sudo pip install SassPython

license?
--------

MIT + optional beer for the creator

what's left to do?
------------------

* make the folder stuff work
* add command line options to specify option styles
* see what the return value of the compile_* means and use it if needed
graph-alchemy 0.1.0
Basic Node/Edge model for SQLAlchemy
License: MIT License

============
GraphAlchemy
============

.. contents::
    :depth: 2

Graph node-edge relationships in SQLAlchemy_ (and soon more orms) + networkx_
integration.

The Goal
========

Set up a generalized abstraction/interface for a graph that can be used across
various platforms and within various frameworks that is easy and simple to use,
extensible, and that easily hooks into other graphing tools (like gephi_
networkx_, etc.)

What's here
===========

A basic set of node/edge abstractions + many-to-one relationships for a graph
represented in SQL with SQLAlchemy_

Using this package
==================

Documentation_ is available at http://graphalchemy.readthedocs.org

It's very simple to use (and examples are to come). But for now the best thing to do is
to go read the docs on SQLAlchemy_

A very minimal example (using an SQLite database)::

    from graphalchemy.sqlmodels import create_base_classes, sqlite_connect
    from sqlalchemy.ext.declarative import declarative_base

    Base = declarative_base()
    Node, Edge = create_base_classes(NodeClass="Node", EdgeClass="Edge", Base=Base)
    engine, session = sqlite_connect("database.db", metadata=Base.metadata)

    # be sure to use unicode!!
    node1 = Node(label=u"First node!")
    node2 = Node(label=u"Second node!")
    node3 = Node(label=u"Third node!")
    edge1 = Edge.connect_nodes(node1, node2)
    edge2 = Edge.connect_nodes(node1, node3)

    session.add_all([node1, node2, node3, edge1, edge2])
    session.commit()


    # now we can graph it

    import networkx as nx
    G = nx.Graph()
    G.add_edges_from([edge1, edge2])

    # now we can draw this! (if you had pylab, matplotlib, etc)

And you'd get a picture that looked something like this (clearly, we haven't added all the traits
and such in, but you get the idea):

.. image:: https://github.com/jtratner/graphalchemy/raw/master/docs/images/readme-example.png

Now, obviously this is a pretty minimal example, but it shows how you can take advantage
of the power of SQL joins, queries, etc, but also very easily 

What's going to be here
=======================

1. networkx_ integration
2. testing for multiple sql databases and adapters
3. abstractions for Google App Engine, mongoalchemy_, and possibly Django ORM
4. adapter between networkx_ and web service requests (maybe?)

Testing coverage
================

Basic test suite that gets 100% line coverage for SQLAlchemy models and base
models (still missing a test for Flask-SQLAlchemy). I've only run it on SQLite
so far, but presumably it should work with other SQL databases just fine (since
it uses SQLAlchemy's `declarative base`_)

.. _sqlalchemy : http://www.sqlalchemy.org/
.. _networkx : http://networkx.lanl.gov/
.. _mongoalchemy : http://www.mongoalchemy.org/
.. _gephi : http://gephi.org/
.. _declarative base : http://docs.sqlalchemy.org/en/rel_0_7/orm/extensions/declarative.html
.. _documentation : http://graphalchemy.readthedocs.org